Fixing regression causing PagedView not to load subsequent widget pages.
Change-Id: I1da1bd0ec5e4b964dd43cdba98d36ef30655a4a3
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index cb75f2a..aaff588 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -181,6 +181,7 @@
// 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 @@
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 @@
computeScroll();
}
+ // Defer loading associated pages until the scroll settles
+ mDeferLoadAssociatedPagesUntilScrollCompletes = true;
+
mForceScreenScrolled = true;
invalidate();
}