summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Workspace.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-06-18 15:09:17 -0700
committerWinson Chung <winsonc@google.com>2012-06-18 15:09:39 -0700
commitcc1cfe4b0c521a2add64f851a32f39be2b0327a6 (patch)
treeb709a8ede5e6236cae447f240754268f4006f10d /src/com/android/launcher2/Workspace.java
parente783cde98d59a2df1d4645f07b278322cab16ecb (diff)
downloadandroid_packages_apps_Trebuchet-cc1cfe4b0c521a2add64f851a32f39be2b0327a6.tar.gz
android_packages_apps_Trebuchet-cc1cfe4b0c521a2add64f851a32f39be2b0327a6.tar.bz2
android_packages_apps_Trebuchet-cc1cfe4b0c521a2add64f851a32f39be2b0327a6.zip
Fixing issue where dropping items onto side pages might drop them two pages away. (Bug 6433177)
Change-Id: I7fa745c269e63d699671cdaf0b527f2675ce3081
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r--src/com/android/launcher2/Workspace.java8
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;
}