Loading src/com/android/launcher3/DeviceProfile.java +9 −5 Original line number Diff line number Diff line Loading @@ -611,10 +611,10 @@ public class DeviceProfile { isTwoPanels ? inv.allAppsSpecsTwoPanelId : inv.allAppsSpecsId), ResponsiveSpecType.AllApps); mAllAppsResponsiveWidthSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, DimensionType.WIDTH, numColumns, mResponsiveWidthSpec.getAvailableSpace(), DimensionType.WIDTH, numColumns, availableWidthPx, mResponsiveWidthSpec); mAllAppsResponsiveHeightSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, DimensionType.HEIGHT, inv.numRows, mResponsiveHeightSpec.getAvailableSpace(), DimensionType.HEIGHT, inv.numRows, heightPx - mInsets.top, mResponsiveHeightSpec); ResponsiveSpecsProvider folderSpecs = ResponsiveSpecsProvider.create( Loading Loading @@ -1271,8 +1271,12 @@ public class DeviceProfile { allAppsCellHeightPx = mAllAppsResponsiveHeightSpec.getCellSizePx() + mAllAppsResponsiveHeightSpec.getGutterPx(); allAppsCellWidthPx = mAllAppsResponsiveWidthSpec.getCellSizePx(); allAppsPadding.left = mAllAppsResponsiveWidthSpec.getStartPaddingPx(); allAppsPadding.right = mAllAppsResponsiveWidthSpec.getEndPaddingPx(); // This workaround is needed to align AllApps icons with Workspace icons // since AllApps doesn't have borders between cells int halfBorder = allAppsBorderSpacePx.x / 2; allAppsPadding.left = mAllAppsResponsiveWidthSpec.getStartPaddingPx() - halfBorder; allAppsPadding.right = mAllAppsResponsiveWidthSpec.getEndPaddingPx() - halfBorder; } /** Loading @@ -1293,7 +1297,7 @@ public class DeviceProfile { + (allAppsBorderSpacePx.x * (numShownAllAppsColumns - 1)) + allAppsPadding.left + allAppsPadding.right; allAppsLeftRightMargin = Math.max(1, (availableWidthPx - usedWidth) / 2); } else { } else if (!mIsResponsiveGrid) { allAppsPadding.left = allAppsPadding.right = Math.max(0, desiredWorkspaceHorizontalMarginPx + cellLayoutHorizontalPadding - (allAppsBorderSpacePx.x / 2)); Loading src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +1 −2 Original line number Diff line number Diff line Loading @@ -1101,7 +1101,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> mlp.rightMargin = insets.right; setLayoutParams(mlp); if (grid.isVerticalBarLayout()) { if (grid.isVerticalBarLayout() && !FeatureFlags.enableResponsiveWorkspace()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { int topPadding = grid.allAppsPadding.top; Loading @@ -1111,7 +1111,6 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> } setPadding(grid.allAppsLeftRightMargin, topPadding, grid.allAppsLeftRightMargin, 0); } InsettableFrameLayout.dispatchInsets(this, insets); } Loading Loading
src/com/android/launcher3/DeviceProfile.java +9 −5 Original line number Diff line number Diff line Loading @@ -611,10 +611,10 @@ public class DeviceProfile { isTwoPanels ? inv.allAppsSpecsTwoPanelId : inv.allAppsSpecsId), ResponsiveSpecType.AllApps); mAllAppsResponsiveWidthSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, DimensionType.WIDTH, numColumns, mResponsiveWidthSpec.getAvailableSpace(), DimensionType.WIDTH, numColumns, availableWidthPx, mResponsiveWidthSpec); mAllAppsResponsiveHeightSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, DimensionType.HEIGHT, inv.numRows, mResponsiveHeightSpec.getAvailableSpace(), DimensionType.HEIGHT, inv.numRows, heightPx - mInsets.top, mResponsiveHeightSpec); ResponsiveSpecsProvider folderSpecs = ResponsiveSpecsProvider.create( Loading Loading @@ -1271,8 +1271,12 @@ public class DeviceProfile { allAppsCellHeightPx = mAllAppsResponsiveHeightSpec.getCellSizePx() + mAllAppsResponsiveHeightSpec.getGutterPx(); allAppsCellWidthPx = mAllAppsResponsiveWidthSpec.getCellSizePx(); allAppsPadding.left = mAllAppsResponsiveWidthSpec.getStartPaddingPx(); allAppsPadding.right = mAllAppsResponsiveWidthSpec.getEndPaddingPx(); // This workaround is needed to align AllApps icons with Workspace icons // since AllApps doesn't have borders between cells int halfBorder = allAppsBorderSpacePx.x / 2; allAppsPadding.left = mAllAppsResponsiveWidthSpec.getStartPaddingPx() - halfBorder; allAppsPadding.right = mAllAppsResponsiveWidthSpec.getEndPaddingPx() - halfBorder; } /** Loading @@ -1293,7 +1297,7 @@ public class DeviceProfile { + (allAppsBorderSpacePx.x * (numShownAllAppsColumns - 1)) + allAppsPadding.left + allAppsPadding.right; allAppsLeftRightMargin = Math.max(1, (availableWidthPx - usedWidth) / 2); } else { } else if (!mIsResponsiveGrid) { allAppsPadding.left = allAppsPadding.right = Math.max(0, desiredWorkspaceHorizontalMarginPx + cellLayoutHorizontalPadding - (allAppsBorderSpacePx.x / 2)); Loading
src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +1 −2 Original line number Diff line number Diff line Loading @@ -1101,7 +1101,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> mlp.rightMargin = insets.right; setLayoutParams(mlp); if (grid.isVerticalBarLayout()) { if (grid.isVerticalBarLayout() && !FeatureFlags.enableResponsiveWorkspace()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { int topPadding = grid.allAppsPadding.top; Loading @@ -1111,7 +1111,6 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> } setPadding(grid.allAppsLeftRightMargin, topPadding, grid.allAppsLeftRightMargin, 0); } InsettableFrameLayout.dispatchInsets(this, insets); } Loading