summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-13 18:07:18 +0000
committerTony Wickham <twickham@google.com>2015-11-13 18:07:18 +0000
commit6159c242bc610f13e4c7550ae8b15f25603f4b23 (patch)
tree45254dae65e9811de5a0c838bf7ec2fa2cff2cf9 /src/com/android/launcher3/DeviceProfile.java
parent1974e98f5ec4713e50ba64ec32a7607c92ddce9b (diff)
downloadandroid_packages_apps_Trebuchet-6159c242bc610f13e4c7550ae8b15f25603f4b23.tar.gz
android_packages_apps_Trebuchet-6159c242bc610f13e4c7550ae8b15f25603f4b23.tar.bz2
android_packages_apps_Trebuchet-6159c242bc610f13e4c7550ae8b15f25603f4b23.zip
Revert "Revert "Reverting folder cell width on portrait phones.""
This reverts commit 1974e98f5ec4713e50ba64ec32a7607c92ddce9b. Change-Id: I7c5d86de187989c085f676933ce3f1cbd57ed8a7
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 c0ad5163f..ccbfba178 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;