summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-13 18:10:57 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-13 18:10:57 +0000
commitec73dd97f08e243dbd94b699a2303fd1c9fe7c05 (patch)
treef92b1cf7edba17af8ba4c5145532e50a8060ab04 /src/com/android/launcher3/DeviceProfile.java
parent0309fbc65ff99285e67cf3f6ec025a656977e86e (diff)
parent6159c242bc610f13e4c7550ae8b15f25603f4b23 (diff)
downloadandroid_packages_apps_Trebuchet-ec73dd97f08e243dbd94b699a2303fd1c9fe7c05.tar.gz
android_packages_apps_Trebuchet-ec73dd97f08e243dbd94b699a2303fd1c9fe7c05.tar.bz2
android_packages_apps_Trebuchet-ec73dd97f08e243dbd94b699a2303fd1c9fe7c05.zip
Revert "Revert "Reverting folder cell width on portrait phones.""
am: 6159c242bc * commit '6159c242bc610f13e4c7550ae8b15f25603f4b23': Revert "Revert "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;