mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Allowing Launcher to draw behind cutouts
> Launcher uses realSize, availableSize and insets to calculate various layout values. Without drawing behind cutouts, these values are not consistent (insets + availableSize != realSize) leading to jumps in layouts. > Removing fake black bars in low-ram devices to avoid inconsistent insets. > Fixing various layouts not taking lert/right insets into account. Bug: 156268804 Change-Id: I8441db8a468b08a65b57b932050b5b4b37313966
This commit is contained in:
@@ -349,15 +349,15 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
}
|
||||
|
||||
ViewGroup.MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
|
||||
mlp.leftMargin = insets.left;
|
||||
mlp.rightMargin = insets.right;
|
||||
setLayoutParams(mlp);
|
||||
|
||||
if (grid.isVerticalBarLayout()) {
|
||||
mlp.leftMargin = insets.left;
|
||||
mlp.rightMargin = insets.right;
|
||||
setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0);
|
||||
} else {
|
||||
mlp.leftMargin = mlp.rightMargin = 0;
|
||||
setPadding(0, 0, 0, 0);
|
||||
}
|
||||
setLayoutParams(mlp);
|
||||
|
||||
InsettableFrameLayout.dispatchInsets(this, insets);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user