From ae915cecd36af4973061a1cb0b58c5be1be699a0 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Thu, 25 Aug 2011 13:47:22 -0700 Subject: Fixing issue with holographic outlines btw dock and workspace (issue 5135852) Change-Id: I8602fe8d7c15ed3c12a0f790b773f45565a1d312 --- src/com/android/launcher2/CellLayout.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 1841713..bf2b9f8 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -1175,6 +1175,7 @@ public class CellLayout extends ViewGroup { int left = topLeft[0]; int top = topLeft[1]; + if (v != null) { // When drawing the drag outline, it did not account for margin offsets // added by the view's parent. @@ -1185,8 +1186,10 @@ public class CellLayout extends ViewGroup { // Offsets due to the size difference between the View and the dragOutline. // There is a size difference to account for the outer blur, which may lie // outside the bounds of the view. - left += (v.getWidth() - dragOutline.getWidth()) / 2; top += (v.getHeight() - dragOutline.getHeight()) / 2; + // We center about the x axis + left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap) + - dragOutline.getWidth()) / 2; } else { // Center the drag outline in the cell left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap) -- cgit v1.1