mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Landscape grid changes for Workspace/All Apps.
This is the just first CL to get eyes on the changes. Next CL will update the All Apps to be full width. Bug: 37015359 Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
This commit is contained in:
@@ -113,20 +113,18 @@ public abstract class BaseContainerView extends FrameLayout
|
||||
* Calculate the background padding as it can change due to insets/content padding change.
|
||||
*/
|
||||
private void updatePaddings() {
|
||||
Context context = getContext();
|
||||
int paddingLeft;
|
||||
int paddingRight;
|
||||
int paddingTop;
|
||||
int paddingBottom;
|
||||
|
||||
DeviceProfile grid = Launcher.getLauncher(context).getDeviceProfile();
|
||||
DeviceProfile grid = Launcher.getLauncher(getContext()).getDeviceProfile();
|
||||
int[] padding = grid.getContainerPadding();
|
||||
paddingLeft = padding[0] + grid.edgeMarginPx;
|
||||
paddingRight = padding[1] + grid.edgeMarginPx;
|
||||
|
||||
int paddingLeft = padding[0];
|
||||
int paddingRight = padding[1];
|
||||
int paddingTop = 0;
|
||||
int paddingBottom = 0;
|
||||
|
||||
if (!grid.isVerticalBarLayout()) {
|
||||
paddingLeft += grid.edgeMarginPx;
|
||||
paddingRight += grid.edgeMarginPx;
|
||||
paddingTop = paddingBottom = grid.edgeMarginPx;
|
||||
} else {
|
||||
paddingTop = paddingBottom = 0;
|
||||
}
|
||||
updateBackground(paddingLeft, paddingTop, paddingRight, paddingBottom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user