diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 4a489dee8a..4ee8a5115b 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -229,7 +229,8 @@ public class DeviceProfile { hotseatCellHeightPx = iconSizePx; // Folder - folderCellWidthPx = cellWidthPx + 3 * edgeMarginPx; + folderCellWidthPx = Math.min(cellWidthPx + 6 * edgeMarginPx, + (availableWidthPx - 4 * edgeMarginPx) / inv.numFolderColumns); folderCellHeightPx = cellHeightPx + edgeMarginPx; folderBackgroundOffset = -edgeMarginPx; folderIconSizePx = iconSizePx + 2 * -folderBackgroundOffset;