summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-12-04 21:43:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-12-04 21:43:07 +0000
commit0ea74f1394f17aad700bee48b4d8d1bb4a095b4d (patch)
tree857058411bc043f478eaf3ec270c8cd2cbdc3260 /src
parent17bde09a9e9bc4113d9763ccf827307509c04aef (diff)
parent495f44d5fcd877786ffa5e8eea055e18f28e3d85 (diff)
downloadandroid_packages_apps_Trebuchet-0ea74f1394f17aad700bee48b4d8d1bb4a095b4d.tar.gz
android_packages_apps_Trebuchet-0ea74f1394f17aad700bee48b4d8d1bb4a095b4d.tar.bz2
android_packages_apps_Trebuchet-0ea74f1394f17aad700bee48b4d8d1bb4a095b4d.zip
Merge "Limit AllApps insets to certain device configurations. (Bug 11451335)" into jb-ub-now-kermit
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index b84dbafb2..511b7182f 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -716,7 +716,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