Closed
Bug 1189306
Opened 10 years ago
Closed 9 years ago
Integration of Android Design Support library
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Firefox 44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: sebastian, Assigned: sebastian)
References
Details
Attachments
(1 file)
6.57 KB,
patch
|
nalexander
:
review+
|
Details | Diff | Splinter Review |
The Android team recently released a design support library. Theoretically we could replace some of our custom components (for example TabMenuStripLayout) with tested and standardized components (TabLayout, Snackbar, TextInputLayout, ..).
The library will also be helpful in continuing to 'materialize' Fennec (-> Material design). But the library will come at a price and we do not want to grow the APK size unbounded. This bug is just about exploring how we could integrate the library and how expensive this will actually be.
Resources:
* http://developer.android.com/tools/support-library/features.html#design
* http://android-developers.blogspot.de/2015/05/android-design-support-library.html
Comment 1•10 years ago
|
||
Thanks for filing this Sebastian, I know we've talked about this for a while. I'm all for it, especially since I see this having more and more benefits for us as we move forward.
Assignee | ||
Comment 2•10 years ago
|
||
Just adding the library to the gradle based build let's the APK grow by 102596 bytes (~ 100 KB)
> -rw-r--r-- 1 sebastian staff 34359294 Aug 5 17:52 after-lib.apk
> -rw-r--r-- 1 sebastian staff 34256698 Aug 5 17:46 before-lib.apk
Actually I was expecting more growth. I wonder how much we get back by getting rid of our implementations of TabMenuStripLayout etc.
Keep in mind the library in its current form may be getting ProGuarded out - as we start to use it, the size of the APK could increase.
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #3)
> Keep in mind the library in its current form may be getting ProGuarded out -
> as we start to use it, the size of the APK could increase.
Yeah, definitely. This was just a first basic test. Mostly because this just requires a one line change. ;) Will definitely do some more investigation and try to add it to the mach build too. Also maybe trying to replace a simple component with one of the library and see how this changes overall size.
Comment 5•9 years ago
|
||
For the record, this ticket will get *MUCH* easier post Bug 1108782 (so much so that I'm calling that a pre-requisite). I fully support using these standardized libraries to ease our lives.
Depends on: 1108782
Blocks: 1157526
Assignee | ||
Comment 6•9 years ago
|
||
I'm going to look into this to see whether we can use snackbars soon (bug 1157526).
Assignee: nobody → s.kaspari
Assignee | ||
Comment 7•9 years ago
|
||
Try build without android design support library:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6440390fe2f0
Try build with library added and dummy usage of snackbar:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5123e22c33b9
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #7)
> Try build with library added and dummy usage of snackbar:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=5123e22c33b9
This did not include my patch from bug 1214630. New push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3ad86c428a63
Assignee | ||
Updated•9 years ago
|
Summary: Investigate: Integration of Android Design Support library → Integration of Android Design Support library
Assignee | ||
Comment 9•9 years ago
|
||
Size comparison:
Android 2.3 API9 opt:
Without: 40606188 bytes
With: 40848354 bytes
+242166 bytes (~ 236 KB)
Android 4.0 API11+ opt:
Without: 42543954 bytes
With: 42814779 bytes
+270825 bytes (~ 264 KB)
Assignee | ||
Comment 10•9 years ago
|
||
The AAR itself is 238 KB (v23.0.1).
Assignee | ||
Comment 11•9 years ago
|
||
That's the patch for the build changes.
Attachment #8674179 -
Flags: review?(nalexander)
Assignee | ||
Comment 12•9 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #10)
> The AAR itself is 238 KB (v23.0.1).
The uncompressed AAR is 339057 bytes (~ 331 KB)
Comment 13•9 years ago
|
||
Comment on attachment 8674179 [details] [diff] [review]
1189306-android-design-support-library.patch
Review of attachment 8674179 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. Can you post before and after APK sizes, so we really know what to expect? (It's reported in TH.)
Updated•9 years ago
|
Attachment #8674179 -
Flags: review?(nalexander) → review+
Comment 14•9 years ago
|
||
Ah, you already posted APK sizes. Thanks.
fabrice, reuben: it is possible that this is, or will be, a dependency of GV and not just Fennec. Just letting you know that it may be needed in b2gdroid, although I expect it won't be on day one. Like the appcompat-v7 library.
Flags: needinfo?(reuben.bmo)
Flags: needinfo?(fabrice)
Assignee | ||
Comment 16•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/5b8473ca678da4daa637109a0a96aee9281e5532
Bug 1189306 - Add Android Design Support library to gradle and mach builds. r=nalexander
Comment 18•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•