Increase max distance for folder creation for tablets.
Tablets generally have larger cell sizes (relative to phones, and relative to
the icon sizes with the cells). By increasing the distance from 55% to 75% of
icon size, it is easier for users to meet the folder creation threshold before
the icon reorder timeout is triggered.
Bug: 110796219
Change-Id: I8264390b8510340f4062e05ec12d0755e93a80d8
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index abba9c4..54d29c1 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -286,7 +286,9 @@
mInsets.set(insets);
DeviceProfile grid = mLauncher.getDeviceProfile();
- mMaxDistanceForFolderCreation = (0.55f * grid.iconSizePx);
+ mMaxDistanceForFolderCreation = grid.isTablet
+ ? 0.75f * grid.iconSizePx
+ : 0.55f * grid.iconSizePx;
mWorkspaceFadeInAdjacentScreens = grid.shouldFadeAdjacentWorkspaceScreens();
Rect padding = grid.workspacePadding;