Allowing Launcher to draw behind cutouts
> Launcher uses realSize, availableSize and insets to calculate
various layout values. Without drawing behind cutouts, these values
are not consistent (insets + availableSize != realSize) leading to
jumps in layouts.
> Removing fake black bars in low-ram devices to avoid inconsistent
insets.
> Fixing various layouts not taking lert/right insets into account.
Bug: 156268804
Change-Id: I8441db8a468b08a65b57b932050b5b4b37313966
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 72831f4..e3cd0bd 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -538,7 +538,6 @@
mInsets.right + hotseatBarSidePaddingStartPx, mInsets.bottom);
}
} else {
-
// We want the edges of the hotseat to line up with the edges of the workspace, but the
// icons in the hotseat are a different size, and so don't line up perfectly. To account
// for this, we pad the left and right of the hotseat with half of the difference of a
@@ -547,9 +546,11 @@
float hotseatCellWidth = (float) widthPx / inv.numHotseatIcons;
int hotseatAdjustment = Math.round((workspaceCellWidth - hotseatCellWidth) / 2);
mHotseatPadding.set(
- hotseatAdjustment + workspacePadding.left + cellLayoutPaddingLeftRightPx,
+ hotseatAdjustment + workspacePadding.left + cellLayoutPaddingLeftRightPx
+ + mInsets.left,
hotseatBarTopPaddingPx,
- hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx,
+ hotseatAdjustment + workspacePadding.right + cellLayoutPaddingLeftRightPx
+ + mInsets.right,
hotseatBarBottomPaddingPx + mInsets.bottom + cellLayoutBottomPaddingPx);
}
return mHotseatPadding;