diff options
author | Winson Chung <winsonc@google.com> | 2012-06-18 15:31:49 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-18 15:31:49 -0700 |
commit | 0da0b6b4daa792fbde450cb6c64b1fc3e8689af6 (patch) | |
tree | 0861c8832180e01d0ec113fdb2ad6a331a58e67e | |
parent | 34ce91e89b9f07d53920d32287f19adef71a3e43 (diff) | |
parent | cc1cfe4b0c521a2add64f851a32f39be2b0327a6 (diff) | |
download | android_packages_apps_Trebuchet-0da0b6b4daa792fbde450cb6c64b1fc3e8689af6.tar.gz android_packages_apps_Trebuchet-0da0b6b4daa792fbde450cb6c64b1fc3e8689af6.tar.bz2 android_packages_apps_Trebuchet-0da0b6b4daa792fbde450cb6c64b1fc3e8689af6.zip |
Merge "Fixing issue where dropping items onto side pages might drop them two pages away. (Bug 6433177)"
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index e18d8effd..174d23b4d 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -2385,7 +2385,13 @@ public class Workspace extends SmoothPagedView // Here we store the final page that will be dropped to, if the workspace in fact // receives the drop if (mInScrollArea) { - mDropToLayout = mDragOverlappingLayout; + if (isPageMoving()) { + // If the user drops while the page is scrolling, we should use that page as the + // destination instead of the page that is being hovered over. + mDropToLayout = (CellLayout) getPageAt(getNextPage()); + } else { + mDropToLayout = mDragOverlappingLayout; + } } else { mDropToLayout = mDragTargetLayout; } |