diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index d6669ea4f0..8d2f480083 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -857,7 +857,8 @@ public class DeviceProfile { allAppsLeftRightMargin = Math.max(1, (availableWidthPx - usedWidth) / 2); } else { allAppsLeftRightPadding = - desiredWorkspaceHorizontalMarginPx + cellLayoutHorizontalPadding; + Math.max(0, desiredWorkspaceHorizontalMarginPx + cellLayoutHorizontalPadding + - (allAppsBorderSpacePx.x / 2)); } } diff --git a/tests/src/com/android/launcher3/nonquickstep/DeviceProfileDumpTest.kt b/tests/src/com/android/launcher3/nonquickstep/DeviceProfileDumpTest.kt index a81413e1d3..c91a4a9041 100644 --- a/tests/src/com/android/launcher3/nonquickstep/DeviceProfileDumpTest.kt +++ b/tests/src/com/android/launcher3/nonquickstep/DeviceProfileDumpTest.kt @@ -105,7 +105,7 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() { "\tallAppsBorderSpacePxX: 42.0px (16.0dp)\n" + "\tallAppsBorderSpacePxY: 42.0px (16.0dp)\n" + "\tnumShownAllAppsColumns: 5\n" + - "\tallAppsLeftRightPadding: 21.0px (8.0dp)\n" + + "\tallAppsLeftRightPadding: 0.0px (0.0dp)\n" + "\tallAppsLeftRightMargin: 0.0px (0.0dp)\n" + "\thotseatBarSizePx: 294.0px (112.0dp)\n" + "\tinv.hotseatColumnSpan: 5\n" + @@ -241,7 +241,7 @@ class DeviceProfileDumpTest : AbstractDeviceProfileTest() { "\tallAppsBorderSpacePxX: 42.0px (16.0dp)\n" + "\tallAppsBorderSpacePxY: 42.0px (16.0dp)\n" + "\tnumShownAllAppsColumns: 5\n" + - "\tallAppsLeftRightPadding: 21.0px (8.0dp)\n" + + "\tallAppsLeftRightPadding: 0.0px (0.0dp)\n" + "\tallAppsLeftRightMargin: 0.0px (0.0dp)\n" + "\thotseatBarSizePx: 273.0px (104.0dp)\n" + "\tinv.hotseatColumnSpan: 5\n" +