OSDN Git Service

Setting correct active page when shrinking
authorMichael Jurka <mikejurka@google.com>
Thu, 28 Oct 2010 01:10:55 +0000 (18:10 -0700)
committerMichael Jurka <mikejurka@google.com>
Fri, 29 Oct 2010 19:18:10 +0000 (12:18 -0700)
Bug: 3130373

Change-Id: I5fa8772bd557b828aaac0d6433f1ff148b0d9f57

src/com/android/launcher2/Workspace.java

index e37907c..5a31e9b 100644 (file)
@@ -707,7 +707,7 @@ public class Workspace extends SmoothPagedView
         mShrunkenState = shrinkPosition;
 
         // Stop any scrolling, move to the current page right away
-        setCurrentPage(mCurrentPage);
+        setCurrentPage((mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage);
         updateWhichPagesAcceptDrops(mShrunkenState);
 
         // we intercept and reject all touch events when we're small, so be sure to reset the state