From b28c4fcf351dc9f44f69253b227880758f6b460c Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Tue, 20 Jun 2017 10:58:36 -0700 Subject: 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 --- src/com/android/launcher3/ShortcutAndWidgetContainer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android/launcher3/ShortcutAndWidgetContainer.java') diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java index 3a3e13d22..fd708c0fd 100644 --- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java +++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java @@ -120,7 +120,9 @@ public class ShortcutAndWidgetContainer extends ViewGroup { // Center the icon/folder int cHeight = getCellContentHeight(); int cellPaddingY = (int) Math.max(0, ((lp.height - cHeight) / 2f)); - int cellPaddingX = profile.cellPaddingXPx; + int cellPaddingX = mContainerType == CellLayout.WORKSPACE + ? profile.workspaceCellPaddingXPx + : (int) (profile.edgeMarginPx / 2f); child.setPadding(cellPaddingX, cellPaddingY, cellPaddingX, 0); } } else { -- cgit v1.2.3