mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Re-apply all apps insets when unfolding.
Previously, if insets had been applied while folded ("phone"),
they would stick around when unfolding ("tablet").
This applies the intended 0 left/right margins when in "tablet"
mode regardless of the insets.
Fix: 321159393
Test: Open all apps in phone landscape, unfold
Flag: NA
Change-Id: Ida1f20711a2a2b9b54f6b2c18abf5abf4fd2b175
This commit is contained in:
@@ -1156,13 +1156,15 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
|
||||
applyAdapterSideAndBottomPaddings(grid);
|
||||
|
||||
MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
|
||||
// Ignore left/right insets on tablet because we are already centered in-screen.
|
||||
if (grid.isPhone) {
|
||||
MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
|
||||
if (grid.isTablet) {
|
||||
mlp.leftMargin = mlp.rightMargin = 0;
|
||||
} else {
|
||||
mlp.leftMargin = insets.left;
|
||||
mlp.rightMargin = insets.right;
|
||||
setLayoutParams(mlp);
|
||||
}
|
||||
setLayoutParams(mlp);
|
||||
|
||||
if (!grid.isVerticalBarLayout() || FeatureFlags.enableResponsiveWorkspace()) {
|
||||
int topPadding = grid.allAppsPadding.top;
|
||||
|
||||
Reference in New Issue
Block a user