diff options
author | Winson Chung <winsonc@google.com> | 2013-12-04 12:51:53 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-12-04 20:52:39 +0000 |
commit | 495f44d5fcd877786ffa5e8eea055e18f28e3d85 (patch) | |
tree | 85ce1bc6e787a6e80d30ce0d7be3809e40c09095 /src | |
parent | 531a5c324e20b354a674851fd4808c105a80af3a (diff) | |
download | android_packages_apps_Trebuchet-495f44d5fcd877786ffa5e8eea055e18f28e3d85.tar.gz android_packages_apps_Trebuchet-495f44d5fcd877786ffa5e8eea055e18f28e3d85.tar.bz2 android_packages_apps_Trebuchet-495f44d5fcd877786ffa5e8eea055e18f28e3d85.zip |
Limit AllApps insets to certain device configurations. (Bug 11451335)
Change-Id: I0b7172bb8c2e8cfb06ef4ff097bdc632d6be0548
Diffstat (limited to 'src')
-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 9e1f1a7b1..ec5e81f74 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -703,7 +703,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 |