Update hotseat sizing for 4x5 grids.
If the qsb bottom margin is smaller than the bottom insets,
we'll fall back to centering the qsb in the available freespace.
Bug: 194435265
Test: 4x5 grid
multiple devices,
with: gesture nav enabled
3 button nav enabled
Change-Id: I9fd4f0da3f2bc9f0b38a621ad1192533260379e3
diff --git a/res/xml/size_limits_80x104.xml b/res/xml/size_limits_80x104.xml
index 93d43fb..4178664 100644
--- a/res/xml/size_limits_80x104.xml
+++ b/res/xml/size_limits_80x104.xml
@@ -80,10 +80,10 @@
launcher:b="16dp"/>
<workspaceBottomPadding
launcher:a="1"
- launcher:c="52dp"/>
+ launcher:c="72dp"/>
<hotseatBottomPadding
launcher:a="0"
- launcher:b="36dp"/>
+ launcher:b="56dp"/>
</device-padding>
<device-padding
@@ -93,10 +93,10 @@
launcher:b="39dp"/>
<workspaceBottomPadding
launcher:a="1"
- launcher:c="75dp"/>
+ launcher:c="95dp"/>
<hotseatBottomPadding
launcher:a="0"
- launcher:b="36dp"/>
+ launcher:b="56dp"/>
</device-padding>
<device-padding
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c960366..1947d48 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -830,11 +830,11 @@
? workspacePadding.bottom
: hotseatBarSizePx - hotseatCellHeightPx - hotseatQsbHeight;
- if (isScalableGrid) {
+ if (isScalableGrid && qsbBottomMarginPx > mInsets.bottom) {
return Math.min(qsbBottomMarginPx, freeSpace);
} else {
return (int) (freeSpace * QSB_CENTER_FACTOR)
- + (isTaskbarPresent ? taskbarSize : getInsets().bottom);
+ + (isTaskbarPresent ? taskbarSize : mInsets.bottom);
}
}