summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-10-07 20:36:15 (GMT)
committerSunny Goyal <sunnygoyal@google.com>2016-10-07 20:36:56 (GMT)
commit68f240eb54891c264031c644a5e5aa4e4fd0c060 (patch)
treee4168531281f32cfe13da54c8cc06f3107359598
parent81300a9f75e34f3cf22b911fb087c528941ed516 (diff)
downloadandroid_packages_apps_Trebuchet-68f240eb54891c264031c644a5e5aa4e4fd0c060.zip
android_packages_apps_Trebuchet-68f240eb54891c264031c644a5e5aa4e4fd0c060.tar.gz
android_packages_apps_Trebuchet-68f240eb54891c264031c644a5e5aa4e4fd0c060.tar.bz2
Updating the folder cell dimensions to be closer to a square
Bug: 31813976 Change-Id: I05d7520daee28a310ff122deaf265951e454d21e
-rw-r--r--res/layout/user_folder.xml10
-rw-r--r--res/layout/user_folder_icon_normalized.xml10
-rw-r--r--res/values/dimens.xml5
-rw-r--r--src/com/android/launcher3/DeviceProfile.java3
4 files changed, 15 insertions, 13 deletions
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index 50bd896..da2a861 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -26,9 +26,9 @@
android:id="@+id/folder_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingLeft="4dp"
- android:paddingRight="4dp"
- android:paddingTop="4dp"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="6dp"
launcher:pageIndicator="@+id/folder_page_indicator" />
<LinearLayout
@@ -51,8 +51,8 @@
android:gravity="center_horizontal"
android:hint="@string/folder_hint_text"
android:imeOptions="flagNoExtractUi"
- android:paddingBottom="@dimen/folder_label_padding"
- android:paddingTop="@dimen/folder_label_padding"
+ android:paddingBottom="@dimen/folder_label_padding_bottom"
+ android:paddingTop="@dimen/folder_label_padding_top"
android:singleLine="true"
android:textColor="#ff777777"
android:includeFontPadding="false"
diff --git a/res/layout/user_folder_icon_normalized.xml b/res/layout/user_folder_icon_normalized.xml
index 16e618a..a8af201 100644
--- a/res/layout/user_folder_icon_normalized.xml
+++ b/res/layout/user_folder_icon_normalized.xml
@@ -26,9 +26,9 @@
android:id="@+id/folder_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingLeft="4dp"
- android:paddingRight="4dp"
- android:paddingTop="4dp"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="6dp"
launcher:pageIndicator="@+id/folder_page_indicator" />
<LinearLayout
@@ -52,8 +52,8 @@
android:gravity="center_horizontal"
android:hint="@string/folder_hint_text"
android:imeOptions="flagNoExtractUi"
- android:paddingBottom="@dimen/folder_label_padding"
- android:paddingTop="@dimen/folder_label_padding"
+ android:paddingBottom="@dimen/folder_label_padding_bottom"
+ android:paddingTop="@dimen/folder_label_padding_top"
android:singleLine="true"
android:textColor="#EE777777"
android:textColorHighlight="#ffCCCCCC"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c112949..eff9d21 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -138,9 +138,10 @@
<dimen name="page_indicator_dot_size">8dp</dimen>
<dimen name="folder_cell_x_padding">9dp</dimen>
- <dimen name="folder_cell_y_padding">8dp</dimen>
+ <dimen name="folder_cell_y_padding">6dp</dimen>
<dimen name="folder_child_text_size">13sp</dimen>
- <dimen name="folder_label_padding">12dp</dimen>
+ <dimen name="folder_label_padding_top">4dp</dimen>
+ <dimen name="folder_label_padding_bottom">12dp</dimen>
<dimen name="folder_label_text_size">14sp</dimen>
<!-- Sizes for managed profile badges -->
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c4e6ed1..f9f8e80 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -284,7 +284,8 @@ public class DeviceProfile {
Utilities.calculateTextHeight(res.getDimension(R.dimen.folder_child_text_size));
final int folderBottomPanelSize =
- 2 * res.getDimensionPixelSize(R.dimen.folder_label_padding)
+ res.getDimensionPixelSize(R.dimen.folder_label_padding_top)
+ + res.getDimensionPixelSize(R.dimen.folder_label_padding_bottom)
+ Utilities.calculateTextHeight(res.getDimension(R.dimen.folder_label_text_size));
// Don't let the folder get too close to the edges of the screen.