summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-09-29 18:21:18 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-29 18:21:18 -0700
commita8901439e72a2fa32a05fae6c38bb8a0c0b23dbf (patch)
tree0eb26c6a7cc21ad0e82d77a41d15b253c082b303
parentcf3d8001e16045901d7fd373685386841a68ae2f (diff)
parentaaf8727eeef17f0b758f83feb79cc861acd28798 (diff)
downloadandroid_packages_apps_Trebuchet-a8901439e72a2fa32a05fae6c38bb8a0c0b23dbf.tar.gz
android_packages_apps_Trebuchet-a8901439e72a2fa32a05fae6c38bb8a0c0b23dbf.tar.bz2
android_packages_apps_Trebuchet-a8901439e72a2fa32a05fae6c38bb8a0c0b23dbf.zip
am aaf8727e: am 2bf63d52: Fixing issue where you couldn\'t drag an item multiple pages (issue 10754544)
* commit 'aaf8727eeef17f0b758f83feb79cc861acd28798': Fixing issue where you couldn't drag an item multiple pages (issue 10754544)
-rw-r--r--src/com/android/launcher3/DragController.java2
-rw-r--r--src/com/android/launcher3/PagedView.java12
-rw-r--r--src/com/android/launcher3/Workspace.java12
3 files changed, 5 insertions, 21 deletions
diff --git a/src/com/android/launcher3/DragController.java b/src/com/android/launcher3/DragController.java
index 3c1a04c2a..5b5c35c5a 100644
--- a/src/com/android/launcher3/DragController.java
+++ b/src/com/android/launcher3/DragController.java
@@ -50,7 +50,7 @@ public class DragController {
public static int DRAG_ACTION_COPY = 1;
private static final int SCROLL_DELAY = 500;
- private static final int RESCROLL_DELAY = 750;
+ private static final int RESCROLL_DELAY = PagedView.PAGE_SNAP_ANIMATION_DURATION + 150;
private static final boolean PROFILE_DRAWING_DURING_DRAG = false;
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 8cdd8e2cc..9cfb3d911 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -2153,19 +2153,11 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
public void scrollLeft() {
- if (mScroller.isFinished()) {
- if (mCurrentPage > 0) snapToPage(mCurrentPage - 1);
- } else {
- if (mNextPage > 0) snapToPage(mNextPage - 1);
- }
+ if (getNextPage() > 0) snapToPage(getNextPage() - 1);
}
public void scrollRight() {
- if (mScroller.isFinished()) {
- if (mCurrentPage < getChildCount() -1) snapToPage(mCurrentPage + 1);
- } else {
- if (mNextPage < getChildCount() -1) snapToPage(mNextPage + 1);
- }
+ if (getNextPage() < getChildCount() -1) snapToPage(getNextPage() + 1);
}
public int getPageForView(View v) {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 7f6964f0f..baddc2dab 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1748,25 +1748,17 @@ public class Workspace extends SmoothPagedView
protected void onStartReordering() {
super.onStartReordering();
- int count = getChildCount();
- for (int i = 0; i < count; i++) {
- ((CellLayout) getChildAt(i)).setUseActiveGlowBackground(true);
- }
showOutlines();
-
// Reordering handles its own animations, disable the automatic ones.
setLayoutTransition(null);
}
protected void onEndReordering() {
super.onEndReordering();
- int count = getChildCount();
- for (int i = 0; i < count; i++) {
- ((CellLayout) getChildAt(i)).setUseActiveGlowBackground(false);
- }
- hideOutlines();
+ hideOutlines();
mScreenOrder.clear();
+ int count = getChildCount();
for (int i = 0; i < count; i++) {
CellLayout cl = ((CellLayout) getChildAt(i));
mScreenOrder.add(getIdForScreen(cl));