summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutAndWidgetContainer.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-09-19 17:32:58 -0700
committerWinson Chung <winsonc@google.com>2013-09-19 18:07:05 -0700
commitcdef04403695872db8be6342b8dacd437ee02d52 (patch)
treed9f62bc88cfd30ec2c9a1c5de3540b3026aaa77a /src/com/android/launcher3/ShortcutAndWidgetContainer.java
parentbb701aaa83889b208ba8910e08023c84693138d1 (diff)
downloadandroid_packages_apps_Trebuchet-cdef04403695872db8be6342b8dacd437ee02d52.tar.gz
android_packages_apps_Trebuchet-cdef04403695872db8be6342b8dacd437ee02d52.tar.bz2
android_packages_apps_Trebuchet-cdef04403695872db8be6342b8dacd437ee02d52.zip
Fixing some grid spacing issues. (Bug 10754537, 10754538)
- Ensuring app names don't run into each other in folders and on the workspace - Ensuring that app names are aligned with folder names Change-Id: Ie8d546eacd52005778d81c46011c1c84bc24118c
Diffstat (limited to 'src/com/android/launcher3/ShortcutAndWidgetContainer.java')
-rw-r--r--src/com/android/launcher3/ShortcutAndWidgetContainer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
index 5ce557192..b9511005e 100644
--- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java
+++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
@@ -137,7 +137,8 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
// Otherwise, center the icon
int cHeight = mIsHotseatLayout ? grid.hotseatCellHeightPx : Math.min(getMeasuredHeight(), grid.cellHeightPx);
int cellPaddingY = (int) Math.max(0, ((lp.height - cHeight) / 2f));
- child.setPadding(0, cellPaddingY, 0, 0);
+ int cellPaddingX = (int) (grid.edgeMarginPx / 2f);
+ child.setPadding(cellPaddingX, cellPaddingY, cellPaddingX, 0);
}
} else {
lp.x = 0;