Loading src/com/android/launcher3/DeviceProfile.java +2 −8 Original line number Diff line number Diff line Loading @@ -78,7 +78,6 @@ import java.util.function.Consumer; public class DeviceProfile { private static final int DEFAULT_DOT_SIZE = 100; private static final float ALL_APPS_TABLET_MAX_ROWS = 5.5f; private static final float MIN_FOLDER_TEXT_SIZE_SP = 16f; private static final float MIN_WIDGET_PADDING_DP = 6f; Loading Loading @@ -734,14 +733,9 @@ public class DeviceProfile { hotseatBorderSpace = cellLayoutBorderSpacePx.y; } // AllApps height calculation depends on updated cellSize if (isTablet) { int collapseHandleHeight = res.getDimensionPixelOffset(R.dimen.bottom_sheet_handle_area_height); int contentHeight = heightPx - collapseHandleHeight - hotseatQsbHeight; int targetContentHeight = (int) (allAppsCellHeightPx * ALL_APPS_TABLET_MAX_ROWS); allAppsPadding.top = Math.max(mInsets.top, contentHeight - targetContentHeight); allAppsShiftRange = heightPx - allAppsPadding.top; allAppsPadding.top = mInsets.top; allAppsShiftRange = heightPx; } else { allAppsPadding.top = 0; allAppsShiftRange = Loading src/com/android/launcher3/InvariantDeviceProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ public class InvariantDeviceProfile { public InvariantDeviceProfile(Context context, String gridName) { String newName = initGrid(context, gridName); if (newName == null || !newName.equals(gridName)) { throw new IllegalArgumentException("Unknown grid name"); throw new IllegalArgumentException("Unknown grid name: " + gridName); } } Loading src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +8 −7 Original line number Diff line number Diff line Loading @@ -1150,14 +1150,15 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> applyAdapterSideAndBottomPaddings(grid); // Ignore left/right insets on tablet because we are already centered in-screen. if (grid.isPhone) { MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.leftMargin = insets.left; mlp.rightMargin = insets.right; setLayoutParams(mlp); } if (grid.isVerticalBarLayout() && !FeatureFlags.enableResponsiveWorkspace()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { if (!grid.isVerticalBarLayout() || FeatureFlags.enableResponsiveWorkspace()) { int topPadding = grid.allAppsPadding.top; if (isSearchBarFloating() && !grid.isTablet) { topPadding += getResources().getDimensionPixelSize( Loading tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DeviceProfile: bottomSheetCloseDuration: 500 bottomSheetWorkspaceScale: 0.97 bottomSheetDepth: 0.0 allAppsShiftRange: 1496.0px (748.0dp) allAppsShiftRange: 1600.0px (800.0dp) allAppsOpenDuration: 500 allAppsCloseDuration: 500 allAppsIconSizePx: 120.0px (60.0dp) Loading tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DeviceProfile: bottomSheetCloseDuration: 500 bottomSheetWorkspaceScale: 0.97 bottomSheetDepth: 0.0 allAppsShiftRange: 1496.0px (748.0dp) allAppsShiftRange: 1600.0px (800.0dp) allAppsOpenDuration: 500 allAppsCloseDuration: 500 allAppsIconSizePx: 120.0px (60.0dp) Loading Loading
src/com/android/launcher3/DeviceProfile.java +2 −8 Original line number Diff line number Diff line Loading @@ -78,7 +78,6 @@ import java.util.function.Consumer; public class DeviceProfile { private static final int DEFAULT_DOT_SIZE = 100; private static final float ALL_APPS_TABLET_MAX_ROWS = 5.5f; private static final float MIN_FOLDER_TEXT_SIZE_SP = 16f; private static final float MIN_WIDGET_PADDING_DP = 6f; Loading Loading @@ -734,14 +733,9 @@ public class DeviceProfile { hotseatBorderSpace = cellLayoutBorderSpacePx.y; } // AllApps height calculation depends on updated cellSize if (isTablet) { int collapseHandleHeight = res.getDimensionPixelOffset(R.dimen.bottom_sheet_handle_area_height); int contentHeight = heightPx - collapseHandleHeight - hotseatQsbHeight; int targetContentHeight = (int) (allAppsCellHeightPx * ALL_APPS_TABLET_MAX_ROWS); allAppsPadding.top = Math.max(mInsets.top, contentHeight - targetContentHeight); allAppsShiftRange = heightPx - allAppsPadding.top; allAppsPadding.top = mInsets.top; allAppsShiftRange = heightPx; } else { allAppsPadding.top = 0; allAppsShiftRange = Loading
src/com/android/launcher3/InvariantDeviceProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ public class InvariantDeviceProfile { public InvariantDeviceProfile(Context context, String gridName) { String newName = initGrid(context, gridName); if (newName == null || !newName.equals(gridName)) { throw new IllegalArgumentException("Unknown grid name"); throw new IllegalArgumentException("Unknown grid name: " + gridName); } } Loading
src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +8 −7 Original line number Diff line number Diff line Loading @@ -1150,14 +1150,15 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> applyAdapterSideAndBottomPaddings(grid); // Ignore left/right insets on tablet because we are already centered in-screen. if (grid.isPhone) { MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.leftMargin = insets.left; mlp.rightMargin = insets.right; setLayoutParams(mlp); } if (grid.isVerticalBarLayout() && !FeatureFlags.enableResponsiveWorkspace()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { if (!grid.isVerticalBarLayout() || FeatureFlags.enableResponsiveWorkspace()) { int topPadding = grid.allAppsPadding.top; if (isSearchBarFloating() && !grid.isTablet) { topPadding += getResources().getDimensionPixelSize( Loading
tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DeviceProfile: bottomSheetCloseDuration: 500 bottomSheetWorkspaceScale: 0.97 bottomSheetDepth: 0.0 allAppsShiftRange: 1496.0px (748.0dp) allAppsShiftRange: 1600.0px (800.0dp) allAppsOpenDuration: 500 allAppsCloseDuration: 500 allAppsIconSizePx: 120.0px (60.0dp) Loading
tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ DeviceProfile: bottomSheetCloseDuration: 500 bottomSheetWorkspaceScale: 0.97 bottomSheetDepth: 0.0 allAppsShiftRange: 1496.0px (748.0dp) allAppsShiftRange: 1600.0px (800.0dp) allAppsOpenDuration: 500 allAppsCloseDuration: 500 allAppsIconSizePx: 120.0px (60.0dp) Loading