Add border spacing and fixed cell height to grid.
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
all the "extra" space to three different variable height
areas.
* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.
Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
- test drag and drop still worked
- test reordering
- test widgets
- test folders
- test multiwindow
Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index aa3ef9b..2a08c50 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -130,6 +130,8 @@
public DeviceProfile landscapeProfile;
public DeviceProfile portraitProfile;
+ public DevicePaddings devicePaddings;
+
public Point defaultWallpaperSize;
public Rect defaultWidgetPadding;
@@ -159,6 +161,7 @@
demoModeLayoutId = p.demoModeLayoutId;
mExtraAttrs = p.mExtraAttrs;
mOverlayMonitor = p.mOverlayMonitor;
+ devicePaddings = p.devicePaddings;
}
@TargetApi(23)
@@ -210,6 +213,8 @@
result.landscapeIconSize = defaultDisplayOption.landscapeIconSize;
result.allAppsIconSize = Math.min(
defaultDisplayOption.allAppsIconSize, myDisplayOption.allAppsIconSize);
+
+ devicePaddings = new DevicePaddings(context);
initGrid(context, myInfo, result);
}
@@ -237,6 +242,7 @@
ArrayList<DisplayOption> allOptions = getPredefinedDeviceProfiles(context, gridName);
DisplayOption displayOption = invDistWeightedInterpolate(displayInfo, allOptions);
+ devicePaddings = new DevicePaddings(context);
initGrid(context, displayInfo, displayOption);
return displayOption.grid.name;
}