diff options
author | Adam Cohen <adamcohen@google.com> | 2011-08-25 13:47:22 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-08-25 13:48:31 -0700 |
commit | ae915cecd36af4973061a1cb0b58c5be1be699a0 (patch) | |
tree | 0950c69b1aae106396733298d58f0d4eba160af8 | |
parent | 536f7db06c18d2622332f7f67002f323b71f1043 (diff) | |
download | packages_apps_trebuchet-ae915cecd36af4973061a1cb0b58c5be1be699a0.zip packages_apps_trebuchet-ae915cecd36af4973061a1cb0b58c5be1be699a0.tar.gz packages_apps_trebuchet-ae915cecd36af4973061a1cb0b58c5be1be699a0.tar.bz2 |
Fixing issue with holographic outlines btw dock and workspace (issue 5135852)
Change-Id: I8602fe8d7c15ed3c12a0f790b773f45565a1d312
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 5 |
1 files changed, 4 insertions, 1 deletions
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) |