mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Fixing regression causing PagedView not to load subsequent widget pages.
Change-Id: I1da1bd0ec5e4b964dd43cdba98d36ef30655a4a3
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user