summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r--src/com/android/launcher2/Workspace.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 7ed19b9..a25db39 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -2259,6 +2259,13 @@ public class Workspace extends SmoothPagedView
dragView.getDragRegionHeight());
}
}
+ } else if (source == this) {
+ // When dragging from the workspace, the drag view is slightly bigger than
+ // the original view, and offset vertically. Adjust to account for this.
+ final View origView = mDragInfo.cell;
+ originX += (dragView.getMeasuredWidth() - origView.getWidth()) / 2;
+ originY += (dragView.getMeasuredHeight() - origView.getHeight()) / 2
+ + dragView.getOffsetY();
}
if (mDragTargetLayout != null) {