diff options
author | Winson Chung <winsonc@google.com> | 2013-12-04 12:51:53 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:21 -0700 |
commit | 46e672ab1101ea33521b5a92e1f264a3e7b0b5de (patch) | |
tree | b40ba6390fea6a982cf17e183a48f1a2b6da7f24 /src/com/android/launcher3 | |
parent | 72180f8f9194524fb740e0af34dc7f62540fbb7b (diff) | |
download | android_packages_apps_Trebuchet-46e672ab1101ea33521b5a92e1f264a3e7b0b5de.tar.gz android_packages_apps_Trebuchet-46e672ab1101ea33521b5a92e1f264a3e7b0b5de.tar.bz2 android_packages_apps_Trebuchet-46e672ab1101ea33521b5a92e1f264a3e7b0b5de.zip |
Limit AllApps insets to certain device configurations. (Bug 11451335)
Change-Id: I0b7172bb8c2e8cfb06ef4ff097bdc632d6be0548
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index b249fb305..b818dd59e 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -745,7 +745,8 @@ public class DeviceProfile { paddingTB = Math.min(paddingTB, (int)((paddingLR + paddingTB) * 0.75f)); int maxAllAppsWidth = (allAppsNumCols * (allAppsCellWidthPx + 2 * paddingLR)); int gridPaddingLR = (availableWidthPx - maxAllAppsWidth) / 2; - if (gridPaddingLR > (allAppsCellWidthPx / 4)) { + // Only adjust the side paddings on landscape phones, or tablets + if ((isTablet() || isLandscape) && gridPaddingLR > (allAppsCellWidthPx / 4)) { padding.left = padding.right = gridPaddingLR; } // The icons are centered, so we can't just offset by the page indicator height |