summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-11-12 13:12:06 -0800
committerTony Wickham <twickham@google.com>2015-11-12 15:34:59 -0800
commitb25e684a766362422f5693f7a2189910c1275584 (patch)
tree45254dae65e9811de5a0c838bf7ec2fa2cff2cf9 /src/com/android/launcher3/DeviceProfile.java
parenta43f78fc4b70bf54b9c90758660b6155ef0257aa (diff)
downloadandroid_packages_apps_Trebuchet-b25e684a766362422f5693f7a2189910c1275584.tar.gz
android_packages_apps_Trebuchet-b25e684a766362422f5693f7a2189910c1275584.tar.bz2
android_packages_apps_Trebuchet-b25e684a766362422f5693f7a2189910c1275584.zip
Reverting folder cell width on portrait phones.
The extra folder cell space added in ag/790800 looks bad on phones in portrait mode, so reverting it here. However, we keep the extra space on tablets or phones in landscape mode, since it provides more room for long app names (bug 22462641). Bug: 25662215 Change-Id: I2a37b884458ee557c9b8cff0c3edef16bfc50efb
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;