diff options
author | Raj Yengisetty <rajesh@cyngn.com> | 2015-04-29 18:03:32 -0700 |
---|---|---|
committer | Raj Yengisetty <rajesh@cyngn.com> | 2015-04-30 10:52:24 -0700 |
commit | 9887c0bb82cd67611b0d89be0ba09680894317af (patch) | |
tree | 7ae346a1386b3fd3b06f6253625b459f36b7b083 /res | |
parent | f6eb35b79a7b9d52e72993c9b3d1e61a95813b7d (diff) | |
download | android_packages_apps_Trebuchet-9887c0bb82cd67611b0d89be0ba09680894317af.tar.gz android_packages_apps_Trebuchet-9887c0bb82cd67611b0d89be0ba09680894317af.tar.bz2 android_packages_apps_Trebuchet-9887c0bb82cd67611b0d89be0ba09680894317af.zip |
AppDrawer: Calculate numColumns by using available screen space
Using the allAppsNumColumns calculated by DeviceProfile isn't
accurate for the vertical app drawer because of the leading char. So
calculate our own. Additionally, set the appropriate padding for the
drawer icon.
Finally, distribute the extra pixel space available for app drawer rows
between the app icons. This way apps are evenly spread across the
screen.
Change-Id: I921c5044d6a490150bf1300762698c2773627ff6
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/app_drawer_item.xml | 2 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/res/layout/app_drawer_item.xml b/res/layout/app_drawer_item.xml index 46a965226..b80ad6756 100644 --- a/res/layout/app_drawer_item.xml +++ b/res/layout/app_drawer_item.xml @@ -49,7 +49,7 @@ <com.android.launcher3.AutoFitTextView android:id="@+id/drawer_item_title" - android:layout_width="27dp" + android:layout_width="@dimen/app_drawer_char_width" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginLeft="6dp" diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 124bcb7db..2992cef1b 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -128,6 +128,7 @@ <dimen name="app_drawer_scrubber_padding">20dp</dimen> <!-- App Drawer Item --> + <dimen name="app_drawer_char_width">27dp</dimen> <dimen name="container_paddingStart">6dp</dimen> <dimen name="container_paddingEnd">6dp</dimen> <dimen name="aftv_width">32dp</dimen> |