diff options
Diffstat (limited to 'src/com/android/launcher2/CellLayoutChildren.java')
-rw-r--r-- | src/com/android/launcher2/CellLayoutChildren.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java index 35f5af104..4ca44ed72 100644 --- a/src/com/android/launcher2/CellLayoutChildren.java +++ b/src/com/android/launcher2/CellLayoutChildren.java @@ -18,10 +18,14 @@ package com.android.launcher2; import android.app.WallpaperManager; import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Paint; import android.graphics.Rect; import android.view.View; import android.view.ViewGroup; +import com.android.launcher2.CellLayout.LayoutParams; + public class CellLayoutChildren extends ViewGroup { static final String TAG = "CellLayoutChildren"; @@ -68,6 +72,22 @@ public class CellLayoutChildren extends ViewGroup { } @Override + protected void dispatchDraw(Canvas canvas) { + // Debug drawing for hit space + if (false) { + Paint p = new Paint(); + p.setColor(0x6600FF00); + for (int i = getChildCount() - 1; i >= 0; i--) { + final View child = getChildAt(i); + final CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams(); + + canvas.drawRect(lp.x, lp.y, lp.x + lp.width, lp.y + lp.height, p); + } + } + super.dispatchDraw(canvas); + } + + @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int count = getChildCount(); for (int i = 0; i < count; i++) { |