diff options
author | Adam Cohen <adamcohen@google.com> | 2011-06-13 16:55:12 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-06-13 16:55:12 -0700 |
commit | bfbfd26c627a18f8e1e3e6d0e53e78feab360203 (patch) | |
tree | 0f823f053dcd28e303d19733e73f8215e0598b3d /src/com/android/launcher2/DragController.java | |
parent | 61fa4197c4316bb0f9b05fcefb676f86197a2273 (diff) | |
download | packages_apps_trebuchet-bfbfd26c627a18f8e1e3e6d0e53e78feab360203.zip packages_apps_trebuchet-bfbfd26c627a18f8e1e3e6d0e53e78feab360203.tar.gz packages_apps_trebuchet-bfbfd26c627a18f8e1e3e6d0e53e78feab360203.tar.bz2 |
Initial implementation of folder reordering
Change-Id: I9f700e71f46e3b91afa96742d9e3890d519c391d
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r-- | src/com/android/launcher2/DragController.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java index 8ad5c7c..5b1b20a 100644 --- a/src/com/android/launcher2/DragController.java +++ b/src/com/android/launcher2/DragController.java @@ -284,6 +284,7 @@ public class DragController { mDragging = true; + mDragObject.dragComplete = false; mDragObject.xOffset = mMotionDownX - (screenX + dragRegionLeft); mDragObject.yOffset = mMotionDownY - (screenY + dragRegionTop); mDragObject.dragSource = source; @@ -373,6 +374,7 @@ public class DragController { public void cancelDrag() { if (mDragging) { // Should we also be calling onDragExit() here? + mDragObject.dragComplete = true; mDragObject.dragSource.onDropCompleted(null, mDragObject, false); } endDrag(); @@ -565,6 +567,7 @@ public class DragController { mDragObject.y = coordinates[1]; boolean accepted = false; if (dropTarget != null) { + mDragObject.dragComplete = true; dropTarget.onDragExit(mDragObject); if (dropTarget.acceptDrop(mDragObject)) { dropTarget.onDrop(mDragObject); |