summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 1d10553f7..5c6a694c0 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -1025,7 +1025,12 @@ public class CellLayout extends ViewGroup {
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
- mBackgroundRect.set(0, 0, w, h);
+
+ // Expand the background drawing bounds by the padding baked into the background drawable
+ Rect padding = new Rect();
+ mNormalBackground.getPadding(padding);
+ mBackgroundRect.set(-padding.left, -padding.top, w + padding.right, h + padding.bottom);
+
mForegroundRect.set(mForegroundPadding, mForegroundPadding,
w - mForegroundPadding, h - mForegroundPadding);
}