OSDN Git Service

Fixing regression in reordering (issue 10994971)
authorAdam Cohen <adamcohen@google.com>
Mon, 30 Sep 2013 01:30:56 +0000 (18:30 -0700)
committerAdam Cohen <adamcohen@google.com>
Mon, 30 Sep 2013 01:31:11 +0000 (18:31 -0700)
Change-Id: I2be98fc892c1a4392c4a5e035dd4cc1fa6fab0a9

src/com/android/launcher3/PagedView.java

index 9cfb3d9..41687d3 100644 (file)
@@ -925,12 +925,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
             mFirstLayout = false;
         }
 
-        if (isPageMoving()) {
-            // If the page is moving, then snap it to the final position to ensure we don't get
-            // stuck between pages
-            snapToDestination();
-        }
-
         if (childCount > 0) {
             final int index = isLayoutRtl() ? 0 : childCount - 1;
             mMaxScrollX = getScrollForPage(index);
@@ -2324,6 +2318,11 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
             loadAssociatedPages(mCurrentPage, immediateAndOnly);
             requestLayout();
         }
+        if (isPageMoving()) {
+            // If the page is moving, then snap it to the final position to ensure we don't get
+            // stuck between pages
+            snapToDestination();
+        }
     }
 
     // Animate the drag view back to the original position