summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-08-28 14:35:39 -0700
committerJon Miranda <jonmiranda@google.com>2017-08-28 14:47:59 -0700
commit7fb9e712e8fe7967b0368e5ebc8606db530b4dc7 (patch)
tree775db93d6237915c707d03abd7a3a691a809daf2 /src/com/android/launcher3/DeviceProfile.java
parent1ad3c8f61edd7ff205530846e6e7c049583b8964 (diff)
downloadandroid_packages_apps_Trebuchet-7fb9e712e8fe7967b0368e5ebc8606db530b4dc7.tar.gz
android_packages_apps_Trebuchet-7fb9e712e8fe7967b0368e5ebc8606db530b4dc7.tar.bz2
android_packages_apps_Trebuchet-7fb9e712e8fe7967b0368e5ebc8606db530b4dc7.zip
Increase overview icon zone percentage from 20% to 22%.
This handles the case where "Home Settings" text is split into two lines and is cropped when the user is in multi-window mode with settings Display=Largest and Font=Largest. Bug: 64976707 Change-Id: Ia1a4ee35a94a2fbe99f8ed25fce93a023e621147
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 150bc5309..c8e4c4908 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -555,9 +555,9 @@ public class DeviceProfile {
int getOverviewModeButtonBarHeight() {
int zoneHeight = (int) (overviewModeIconZoneRatio * availableHeightPx);
- zoneHeight = Math.min(overviewModeMaxIconZoneHeightPx,
- Math.max(overviewModeMinIconZoneHeightPx, zoneHeight));
- return zoneHeight;
+ return Utilities.boundToRange(zoneHeight,
+ overviewModeMinIconZoneHeightPx,
+ overviewModeMaxIconZoneHeightPx);
}
public static int calculateCellWidth(int width, int countX) {
@@ -693,7 +693,8 @@ public class DeviceProfile {
lp = (FrameLayout.LayoutParams) overviewMode.getLayoutParams();
lp.width = Math.min(availableWidthPx, maxWidth);
- lp.height = getOverviewModeButtonBarHeight() + mInsets.bottom;
+ lp.height = getOverviewModeButtonBarHeight();
+ lp.bottomMargin = mInsets.bottom;
overviewMode.setLayoutParams(lp);
}