See if we can skip duplicating resources in the WebApk |
||
Issue descriptionIf you build the shell apk and look at the resources, there's a layout and layout-v17, with the only difference being paddingStart omitted/replaced with paddingLeft. Rather than duplicating these ui elements (~2k), we'd probably be better off just specifying both attributes (if that works) or finding some way to collapse them. More info: https://android-developers.googleblog.com/2013/03/native-rtl-support-in-android-42.html
,
Jul 13 2017
Changed padding from 20dp to 60px. Can't really see a difference in my Nexus 5.
,
Jul 13 2017
Does that change the layout generation?
,
Jul 13 2017
After the change, We only have the layout folder. The new generated layout xml do not have the padding attributes. When I test, as long as the xml has the padding attributes, it will generate layout and layout_V17.
,
Jul 14 2017
Tested on pre-L devices, looks fine.
,
Jul 14 2017
Thanks for the screenshots!
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4c57bcc281cd46830b94d08493356fa7acbd9ac4 commit 4c57bcc281cd46830b94d08493356fa7acbd9ac4 Author: Ran Ji <ranj@chromium.org> Date: Mon Jul 17 15:51:24 2017 Set padding dynamically to avoid build creating duplicated resource copy. Apk size reduces 2kb compare with previous. Bug: 736039 Change-Id: I4fe73fda4e9771cf34b830c3df16e3bca9a468c8 Reviewed-on: https://chromium-review.googlesource.com/570515 Reviewed-by: Xi Han <hanxi@chromium.org> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Ran Ji <ranj@chromium.org> Cr-Commit-Position: refs/heads/master@{#487094} [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/res/layout/choose_host_browser_dialog.xml [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/res/layout/host_browser_list_item.xml [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/shell_apk_version.gni [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ChooseHostBrowserDialog.java [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/InstallHostBrowserDialog.java [modify] https://crrev.com/4c57bcc281cd46830b94d08493356fa7acbd9ac4/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkUtils.java
,
Jul 18 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by yfried...@chromium.org
, Jul 11 2017Owner: ranj@chromium.org
Status: Assigned (was: Untriaged)