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:
Jon Miranda
2017-06-20 10:58:36 -07:00
parent a9d721df78
commit b28c4fcf35
15 changed files with 137 additions and 110 deletions

View File

@@ -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);
}