From 6a5900659274af4b1acaa46182404f7b87228841 Mon Sep 17 00:00:00 2001 From: Thales Lima Date: Tue, 22 Nov 2022 15:52:49 +0000 Subject: [PATCH] Polish hotseat and taskbar with 3 buttons Change margin spaces and logic of how many items the hotseat and taskbar should show. Fix: 246424857 Test: DeviceProfileDumpTest Test: HotseatWidthCalculationTest Change-Id: I8ec71c56a0aa362483c43d6400c762d12cf45f5b --- quickstep/res/values-land/dimens.xml | 4 +- quickstep/res/values/dimens.xml | 6 +- .../taskbar/TaskbarActivityContext.java | 24 +++- .../quickstep/HotseatWidthCalculationTest.kt | 48 +++---- res/values/dimens.xml | 5 +- res/xml/device_profiles.xml | 6 +- src/com/android/launcher3/DeviceProfile.java | 122 ++++++++---------- .../launcher3/InvariantDeviceProfile.java | 15 +++ .../launcher3/DeviceProfileBaseTest.kt | 4 +- 9 files changed, 125 insertions(+), 109 deletions(-) diff --git a/quickstep/res/values-land/dimens.xml b/quickstep/res/values-land/dimens.xml index bc5d02afb9..30983c4d5a 100644 --- a/quickstep/res/values-land/dimens.xml +++ b/quickstep/res/values-land/dimens.xml @@ -76,10 +76,8 @@ 218dp - 94.5dp + 88dp 219.6dp - 84dp - 79dp 48dp 96dp 24dp diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index baf097e580..7a3c35f439 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -303,11 +303,9 @@ 24dp 40dp - 26dp + 48dp 75dp - 47dp - 47dp - 47dp + 48dp diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index 87e2ab9cfb..c76e6c2ff5 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -152,10 +152,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext { TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider unfoldTransitionProgressProvider) { super(windowContext); - mDeviceProfile = launcherDp.copy(this); - final Resources resources = getResources(); + matchDeviceProfile(launcherDp, getResources()); + mNavMode = DisplayController.getNavigationMode(windowContext); mImeDrawsImeNavBar = getBoolByName(IME_DRAWS_IME_NAV_BAR_RES_NAME, resources, false); mIsSafeModeEnabled = TraceHelper.allowIpcs("isSafeMode", @@ -170,8 +170,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { mIsNavBarKidsMode = settingsCache.getValue( Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0); - updateIconSize(resources); - // Get display and corners first, as views might use them in constructor. Display display = windowContext.getDisplay(); Context c = display.getDisplayId() == Display.DEFAULT_DISPLAY @@ -259,8 +257,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public void updateDeviceProfile(DeviceProfile launcherDp, NavigationMode navMode) { mNavMode = navMode; mControllers.taskbarOverlayController.updateLauncherDeviceProfile(launcherDp); - mDeviceProfile = launcherDp.copy(this); - updateIconSize(getResources()); + matchDeviceProfile(launcherDp, getResources()); AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE); // Reapply fullscreen to take potential new screen size into account. @@ -269,6 +266,21 @@ public class TaskbarActivityContext extends BaseTaskbarContext { dispatchDeviceProfileChanged(); } + /** + * Copy the original DeviceProfile, match the number of hotseat icons and qsb width and update + * the icon size + */ + private void matchDeviceProfile(DeviceProfile originDeviceProfile, Resources resources) { + mDeviceProfile = originDeviceProfile.copy(this); + // Taskbar should match the number of icons of hotseat + mDeviceProfile.numShownHotseatIcons = originDeviceProfile.numShownHotseatIcons; + // Same QSB width to have a smooth animation + mDeviceProfile.hotseatQsbWidth = originDeviceProfile.hotseatQsbWidth; + // Update the size of the icons + updateIconSize(resources); + } + + private void updateIconSize(Resources resources) { mDeviceProfile.iconSizePx = resources.getDimensionPixelSize( DisplayController.isTransientTaskbar(this) diff --git a/quickstep/tests/src/com/android/quickstep/HotseatWidthCalculationTest.kt b/quickstep/tests/src/com/android/quickstep/HotseatWidthCalculationTest.kt index 0303bc192e..4837c6c868 100644 --- a/quickstep/tests/src/com/android/quickstep/HotseatWidthCalculationTest.kt +++ b/quickstep/tests/src/com/android/quickstep/HotseatWidthCalculationTest.kt @@ -39,12 +39,12 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(558) + assertThat(dp.hotseatBarEndOffset).isEqualTo(510) assertThat(dp.numShownHotseatIcons).isEqualTo(6) - assertThat(dp.hotseatBorderSpace).isEqualTo(69) + assertThat(dp.hotseatBorderSpace).isEqualTo(70) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(176) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(558) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(150) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(580) assertThat(dp.isQsbInline).isFalse() assertThat(dp.hotseatQsbWidth).isEqualTo(1445) @@ -61,12 +61,12 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(558) + assertThat(dp.hotseatBarEndOffset).isEqualTo(510) assertThat(dp.numShownHotseatIcons).isEqualTo(4) - assertThat(dp.hotseatBorderSpace).isEqualTo(50) + assertThat(dp.hotseatBorderSpace).isEqualTo(40) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(112) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(558) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(150) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(550) assertThat(dp.isQsbInline).isFalse() assertThat(dp.hotseatQsbWidth).isEqualTo(1080) @@ -82,12 +82,12 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(744) + assertThat(dp.hotseatBarEndOffset).isEqualTo(705) assertThat(dp.numShownHotseatIcons).isEqualTo(6) - assertThat(dp.hotseatBorderSpace).isEqualTo(82) + assertThat(dp.hotseatBorderSpace).isEqualTo(54) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(106) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(744) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(231) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(759) assertThat(dp.isQsbInline).isFalse() assertThat(dp.hotseatQsbWidth).isEqualTo(1468) @@ -107,12 +107,12 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(705) + assertThat(dp.hotseatBarEndOffset).isEqualTo(660) assertThat(dp.numShownHotseatIcons).isEqualTo(6) - assertThat(dp.hotseatBorderSpace).isEqualTo(102) + assertThat(dp.hotseatBorderSpace).isEqualTo(100) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(625) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(705) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(300) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(1040) assertThat(dp.isQsbInline).isFalse() assertThat(dp.hotseatQsbWidth).isEqualTo(1233) @@ -128,15 +128,15 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(705) + assertThat(dp.hotseatBarEndOffset).isEqualTo(660) assertThat(dp.numShownHotseatIcons).isEqualTo(6) assertThat(dp.hotseatBorderSpace).isEqualTo(36) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(854) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(705) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(864) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(696) assertThat(dp.isQsbInline).isTrue() - assertThat(dp.hotseatQsbWidth).isEqualTo(531) + assertThat(dp.hotseatQsbWidth).isEqualTo(528) } /** @@ -150,12 +150,12 @@ class HotseatWidthCalculationTest : DeviceProfileBaseTest() { val dp = newDP() dp.isTaskbarPresentInApps = true - assertThat(dp.hotseatBarEndOffset).isEqualTo(705) + assertThat(dp.hotseatBarEndOffset).isEqualTo(660) assertThat(dp.numShownHotseatIcons).isEqualTo(5) - assertThat(dp.hotseatBorderSpace).isEqualTo(43) + assertThat(dp.hotseatBorderSpace).isEqualTo(36) - assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(782) - assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(705) + assertThat(dp.getHotseatLayoutPadding(context).left).isEqualTo(816) + assertThat(dp.getHotseatLayoutPadding(context).right).isEqualTo(700) assertThat(dp.isQsbInline).isTrue() assertThat(dp.hotseatQsbWidth).isEqualTo(480) diff --git a/res/values/dimens.xml b/res/values/dimens.xml index dc53552fa6..6adbe9a2de 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -359,6 +359,7 @@ 0dp 0dp 18dp + 50dp 0dp 44dp 57dp @@ -381,10 +382,8 @@ 0dp 0dp 0dp - 0dp + 0dp 0dp - 0dp - 0dp 0dp 0dp diff --git a/res/xml/device_profiles.xml b/res/xml/device_profiles.xml index 407f2176b9..c9a44a1be0 100644 --- a/res/xml/device_profiles.xml +++ b/res/xml/device_profiles.xml @@ -57,8 +57,9 @@ launcher:numFolderRows="3" launcher:numFolderColumns="4" launcher:numHotseatIcons="4" + launcher:numExtendedHotseatIcons="6" launcher:dbFile="launcher_4_by_4.db" - launcher:inlineNavButtonsEndSpacing="@dimen/taskbar_button_margin_4_4" + launcher:inlineNavButtonsEndSpacing="@dimen/taskbar_button_margin_split" launcher:defaultLayoutId="@xml/default_workspace_4x4" launcher:deviceCategory="phone|multi_display" > @@ -121,8 +122,9 @@ launcher:numFolderRows="4" launcher:numFolderColumns="4" launcher:numHotseatIcons="5" + launcher:numExtendedHotseatIcons="6" launcher:dbFile="launcher.db" - launcher:inlineNavButtonsEndSpacing="@dimen/taskbar_button_margin_5_5" + launcher:inlineNavButtonsEndSpacing="@dimen/taskbar_button_margin_split" launcher:defaultLayoutId="@xml/default_workspace_5x5" launcher:deviceCategory="phone|multi_display" > diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 7ccd195c19..b95b0af5b0 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -188,6 +188,10 @@ public class DeviceProfile { public final int hotseatQsbVisualHeight; private final int hotseatQsbShadowHeight; public int hotseatBorderSpace; + private int minHotseatIconSpacePx; + private int minHotseatQsbWidthPx; + private final int maxHotseatIconSpacePx; + private int inlineNavButtonsEndSpacing; // Bottom sheets public int bottomSheetTopPadding; @@ -434,7 +438,7 @@ public class DeviceProfile { || inv.inlineQsb[INDEX_TWO_PANEL_LANDSCAPE] : inv.inlineQsb[INDEX_DEFAULT] || inv.inlineQsb[INDEX_LANDSCAPE]) && hotseatQsbHeight > 0; - isQsbInline = inv.inlineQsb[mTypeIndex] && canQsbInline; + isQsbInline = isScalableGrid && inv.inlineQsb[mTypeIndex] && canQsbInline; areNavButtonsInline = isTaskbarPresent && !isGestureMode; numShownHotseatIcons = @@ -474,17 +478,17 @@ public class DeviceProfile { hotseatBarSidePaddingStartPx = isVerticalBarLayout() ? workspacePageIndicatorHeight : 0; updateHotseatSizes(pxFromDp(inv.iconSize[INDEX_DEFAULT], mMetrics)); if (areNavButtonsInline && !isPhone) { + inlineNavButtonsEndSpacing = res.getDimensionPixelSize(inv.inlineNavButtonsEndSpacing); /* * 3 nav buttons + * Spacing between nav buttons + - * Little space at the end for contextual buttons + - * Little space between icons and nav buttons + * Space at the end for contextual buttons */ hotseatBarEndOffset = 3 * res.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size) + 2 * res.getDimensionPixelSize(R.dimen.taskbar_button_space_inbetween) - + res.getDimensionPixelSize(inv.inlineNavButtonsEndSpacing) - + res.getDimensionPixelSize(R.dimen.taskbar_hotseat_nav_spacing); + + inlineNavButtonsEndSpacing; } else { + inlineNavButtonsEndSpacing = 0; hotseatBarEndOffset = 0; } @@ -531,8 +535,12 @@ public class DeviceProfile { cellLayoutPadding); updateWorkspacePadding(); + minHotseatIconSpacePx = res.getDimensionPixelSize(R.dimen.min_hotseat_icon_space); + minHotseatQsbWidthPx = res.getDimensionPixelSize(R.dimen.min_hotseat_qsb_width); + maxHotseatIconSpacePx = areNavButtonsInline + ? res.getDimensionPixelSize(R.dimen.max_hotseat_icon_space) : Integer.MAX_VALUE; // Hotseat and QSB width depends on updated cellSize and workspace padding - recalculateHotseatWidthAndBorderSpace(res); + recalculateHotseatWidthAndBorderSpace(); // AllApps height calculation depends on updated cellSize if (isTablet) { @@ -621,68 +629,57 @@ public class DeviceProfile { } } - private void recalculateHotseatWidthAndBorderSpace(Resources res) { - hotseatBorderSpace = calculateHotseatBorderSpace(); + /** + * Calculates the width of the hotseat, changing spaces between the icons and removing icons if + * necessary. + */ + public void recalculateHotseatWidthAndBorderSpace() { + if (!isScalableGrid) return; + + int columns = inv.hotseatColumnSpan[mTypeIndex]; + float hotseatWidthPx = getIconToIconWidthForColumns(columns); + hotseatBorderSpace = calculateHotseatBorderSpace(hotseatWidthPx, /* numExtraBorder= */ 0); hotseatQsbWidth = calculateQsbWidth(hotseatBorderSpace); - // Spaces should be correct when there nav buttons are not inline + // Spaces should be correct when the nav buttons are not inline if (!areNavButtonsInline) { return; } - // Get the maximum width that the hotseat can be - int columns = getPanelCount() * inv.numColumns; - int maxHotseatWidth = getIconToIconWidthForColumns(columns); - int sideSpace = (availableWidthPx - maxHotseatWidth) / 2; - int inlineButtonsOverlap = Math.max(0, hotseatBarEndOffset - sideSpace); - // decrease how much the nav buttons go "inside" the hotseat - maxHotseatWidth -= inlineButtonsOverlap; + // The side space with inline buttons should be what is defined in InvariantDeviceProfile + int sideSpace = inlineNavButtonsEndSpacing; + int maxHotseatWidth = availableWidthPx - sideSpace - hotseatBarEndOffset; + int maxHotseatIconsWidth = maxHotseatWidth - (isQsbInline ? hotseatQsbWidth : 0); + hotseatBorderSpace = calculateHotseatBorderSpace(maxHotseatIconsWidth, + (isQsbInline ? 1 : 0) + /* border between nav buttons and first icon */ 1); - // Get how much space is required to show the hotseat with QSB - int requiredWidth = getHotseatRequiredWidth(); - - // If spaces are fine, use them - if (requiredWidth <= maxHotseatWidth) { - return; - } - - // Calculate the difference of widths and remove a little from each space between icons - // and QSB if it's inline - int spaceDiff = requiredWidth - maxHotseatWidth; - int numOfSpaces = numShownHotseatIcons - (isQsbInline ? 0 : 1); - hotseatBorderSpace -= (spaceDiff / numOfSpaces); - - int minHotseatIconSpaceDp = res.getDimensionPixelSize(R.dimen.min_hotseat_icon_space); - int minHotseatQsbWidthDp = res.getDimensionPixelSize(R.dimen.min_hotseat_qsb_width); - - if (hotseatBorderSpace >= minHotseatIconSpaceDp) { + if (hotseatBorderSpace >= minHotseatIconSpacePx) { return; } // Border space can't be less than the minimum - hotseatBorderSpace = minHotseatIconSpaceDp; - requiredWidth = getHotseatRequiredWidth(); + hotseatBorderSpace = minHotseatIconSpacePx; + int requiredWidth = getHotseatRequiredWidth(); // If there is an inline qsb, change its size if (isQsbInline) { hotseatQsbWidth -= requiredWidth - maxHotseatWidth; - if (hotseatQsbWidth >= minHotseatQsbWidthDp) { + if (hotseatQsbWidth >= minHotseatQsbWidthPx) { return; } // QSB can't be less than the minimum - hotseatQsbWidth = minHotseatQsbWidthDp; + hotseatQsbWidth = minHotseatQsbWidthPx; } + maxHotseatIconsWidth = maxHotseatWidth - (isQsbInline ? hotseatQsbWidth : 0); + // If it still doesn't fit, start removing icons do { numShownHotseatIcons--; - requiredWidth = getHotseatRequiredWidth(); - } while (requiredWidth > maxHotseatWidth && numShownHotseatIcons > 1); + hotseatBorderSpace = calculateHotseatBorderSpace(maxHotseatIconsWidth, + (isQsbInline ? 1 : 0) + /* border between nav buttons and first icon */ 1); + } while (hotseatBorderSpace < minHotseatIconSpacePx && numShownHotseatIcons > 1); - // Add back some space between the icons - spaceDiff = maxHotseatWidth - requiredWidth; - numOfSpaces = numShownHotseatIcons - (isQsbInline ? 0 : 1); - hotseatBorderSpace += (spaceDiff / numOfSpaces); } private Point getCellLayoutBorderSpace(InvariantDeviceProfile idp) { @@ -954,15 +951,14 @@ public class DeviceProfile { } /** - * Hotseat width spans a certain number of columns on scalable grids. - * This method calculates the space between the icons to achieve that width. + * This method calculates the space between the icons to achieve a certain width. */ - private int calculateHotseatBorderSpace() { - if (!isScalableGrid) return 0; - int columns = inv.hotseatColumnSpan[mTypeIndex]; - float hotseatWidthPx = getIconToIconWidthForColumns(columns); + private int calculateHotseatBorderSpace(float hotseatWidthPx, int numExtraBorder) { float hotseatIconsTotalPx = iconSizePx * numShownHotseatIcons; - return (int) (hotseatWidthPx - hotseatIconsTotalPx) / (numShownHotseatIcons - 1); + int hotseatBorderSpace = + (int) (hotseatWidthPx - hotseatIconsTotalPx) + / (numShownHotseatIcons - 1 + numExtraBorder); + return Math.min(hotseatBorderSpace, maxHotseatIconSpacePx); } @@ -1283,12 +1279,16 @@ public class DeviceProfile { int hotseatBarTopPadding = hotseatBarSizePx - hotseatBarBottomPadding - hotseatCellHeightPx; - // Push icons to the side - int requiredWidth = getHotseatRequiredWidth(); - int hotseatWidth = Math.min(requiredWidth, availableWidthPx - hotseatBarEndOffset); - int sideSpacing = (availableWidthPx - hotseatWidth) / 2; + int hotseatWidth = getHotseatRequiredWidth(); + int leftSpacing = (availableWidthPx - hotseatWidth) / 2; + int rightSpacing = leftSpacing; + // Hotseat aligns to the left with nav buttons + if (hotseatBarEndOffset > 0) { + leftSpacing = inlineNavButtonsEndSpacing; + rightSpacing = availableWidthPx - hotseatWidth - leftSpacing + hotseatBorderSpace; + } - hotseatBarPadding.set(sideSpacing, hotseatBarTopPadding, sideSpacing, + hotseatBarPadding.set(leftSpacing, hotseatBarTopPadding, rightSpacing, hotseatBarBottomPadding); boolean isRtl = Utilities.isRtl(context.getResources()); @@ -1297,14 +1297,6 @@ public class DeviceProfile { } else { hotseatBarPadding.left += getAdditionalQsbSpace(); } - - if (hotseatBarEndOffset > sideSpacing) { - int diff = isRtl - ? sideSpacing - hotseatBarEndOffset - : hotseatBarEndOffset - sideSpacing; - hotseatBarPadding.left -= diff; - hotseatBarPadding.right += diff; - } } else if (isScalableGrid) { int sideSpacing = (availableWidthPx - hotseatQsbWidth) / 2; hotseatBarPadding.set(sideSpacing, @@ -1340,7 +1332,7 @@ public class DeviceProfile { private int getHotseatRequiredWidth() { int additionalQsbSpace = getAdditionalQsbSpace(); return iconSizePx * numShownHotseatIcons - + hotseatBorderSpace * (numShownHotseatIcons - 1) + + hotseatBorderSpace * (numShownHotseatIcons - (areNavButtonsInline ? 0 : 1)) + additionalQsbSpace; } diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 6f44375fd8..ffe81ad2aa 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -422,6 +422,21 @@ public class InvariantDeviceProfile { } supportedProfiles = Collections.unmodifiableList(localSupportedProfiles); + int numMinShownHotseatIconsForTablet = supportedProfiles + .stream() + .filter(deviceProfile -> deviceProfile.isTablet) + .mapToInt(deviceProfile -> deviceProfile.numShownHotseatIcons) + .min() + .orElse(0); + + supportedProfiles + .stream() + .filter(deviceProfile -> deviceProfile.isTablet) + .forEach(deviceProfile -> { + deviceProfile.numShownHotseatIcons = numMinShownHotseatIconsForTablet; + deviceProfile.recalculateHotseatWidthAndBorderSpace(); + }); + ComponentName cn = new ComponentName(context.getPackageName(), getClass().getName()); defaultWidgetPadding = AppWidgetHostView.getDefaultPaddingForWidget(context, cn, null); } diff --git a/tests/src/com/android/launcher3/DeviceProfileBaseTest.kt b/tests/src/com/android/launcher3/DeviceProfileBaseTest.kt index 4e166ce418..13e56f3456 100644 --- a/tests/src/com/android/launcher3/DeviceProfileBaseTest.kt +++ b/tests/src/com/android/launcher3/DeviceProfileBaseTest.kt @@ -109,7 +109,7 @@ abstract class DeviceProfileBaseTest { numFolderColumns = 3 folderStyle = R.style.FolderDefaultStyle - inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_4_5 + inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_split horizontalMargin = FloatArray(4) { 22f } @@ -277,7 +277,7 @@ abstract class DeviceProfileBaseTest { numFolderColumns = 3 folderStyle = R.style.FolderDefaultStyle - inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_4_4 + inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_split horizontalMargin = floatArrayOf(21.5f, 21.5f, 22.5f, 30.5f)