summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-12 23:41:06 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-12 23:41:06 +0000
commit79b4194765c5cea13aae6064099735d147ad8efc (patch)
treef92b1cf7edba17af8ba4c5145532e50a8060ab04 /src/com/android/launcher3/DeviceProfile.java
parent9e163059bba6f6b7424e10b35db3886694ab4bd8 (diff)
parentb25e684a766362422f5693f7a2189910c1275584 (diff)
downloadandroid_packages_apps_Trebuchet-79b4194765c5cea13aae6064099735d147ad8efc.tar.gz
android_packages_apps_Trebuchet-79b4194765c5cea13aae6064099735d147ad8efc.tar.bz2
android_packages_apps_Trebuchet-79b4194765c5cea13aae6064099735d147ad8efc.zip
Reverting folder cell width on portrait phones.
am: b25e684a76 * commit 'b25e684a766362422f5693f7a2189910c1275584': Reverting folder cell width on portrait phones.
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index d2ca8f60d..5032dcf19 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -245,7 +245,9 @@ public class DeviceProfile {
hotseatCellHeightPx = iconSizePx;
// Folder
- folderCellWidthPx = Math.min(cellWidthPx + 6 * edgeMarginPx,
+ int folderCellPadding = isTablet || isLandscape ? 6 * edgeMarginPx : 3 * edgeMarginPx;
+ // Don't let the folder get too close to the edges of the screen.
+ folderCellWidthPx = Math.min(cellWidthPx + folderCellPadding,
(availableWidthPx - 4 * edgeMarginPx) / inv.numFolderColumns);
folderCellHeightPx = cellHeightPx + edgeMarginPx;
folderBackgroundOffset = -edgeMarginPx;