diff options
author | Winson Chung <winsonc@google.com> | 2013-07-19 13:49:06 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-07-22 13:28:59 -0700 |
commit | 9c0565fe9385f92b7b2608d6506e4e5a7c500c2d (patch) | |
tree | f10fa7a733a0766580bfe4211ab776d9a95184ca /src/com | |
parent | bc902ad603b3821f62178df31bc3fd0a501f664b (diff) | |
download | android_packages_apps_Trebuchet-9c0565fe9385f92b7b2608d6506e4e5a7c500c2d.tar.gz android_packages_apps_Trebuchet-9c0565fe9385f92b7b2608d6506e4e5a7c500c2d.tar.bz2 android_packages_apps_Trebuchet-9c0565fe9385f92b7b2608d6506e4e5a7c500c2d.zip |
Fixing regression causing PagedView not to load subsequent widget pages.
Change-Id: I1da1bd0ec5e4b964dd43cdba98d36ef30655a4a3
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index cb75f2a70..aaff58886 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -181,6 +181,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc // If true, the subclass should directly update scrollX itself in its computeScroll method // (SmoothPagedView does this) protected boolean mDeferScrollUpdate = false; + protected boolean mDeferLoadAssociatedPagesUntilScrollCompletes = false; protected boolean mIsPageMoving = false; @@ -618,6 +619,12 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc mNextPage = INVALID_PAGE; notifyPageSwitchListener(); + // Load the associated pages if necessary + if (mDeferLoadAssociatedPagesUntilScrollCompletes) { + loadAssociatedPages(mCurrentPage); + mDeferLoadAssociatedPagesUntilScrollCompletes = false; + } + // We don't want to trigger a page end moving unless the page has settled // and the user has stopped scrolling if (mTouchState == TOUCH_STATE_REST) { @@ -2007,6 +2014,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc computeScroll(); } + // Defer loading associated pages until the scroll settles + mDeferLoadAssociatedPagesUntilScrollCompletes = true; + mForceScreenScrolled = true; invalidate(); } |