diff options
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index d7a59d607..b41972ac1 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -995,8 +995,10 @@ public class CellLayout extends ViewGroup { top += (v.getHeight() - dragOutline.getHeight()) / 2; } else { // Center the drag outline in the cell - left += (mCellWidth - dragOutline.getWidth()) / 2; - top += (mCellHeight - dragOutline.getHeight()) / 2; + left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap) + - dragOutline.getWidth()) / 2; + top += ((mCellHeight * spanY) + ((spanY - 1) * mHeightGap) + - dragOutline.getHeight()) / 2; } final int oldIndex = mDragOutlineCurrent; |