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
This commit is contained in:
Jon Miranda
2018-07-17 13:49:12 -07:00
parent 00fec0d53b
commit 5aab8703ee

View File

@@ -286,7 +286,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
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;