Merge "Set mNextPage after springBack when overscrolling" into ub-launcher3-qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-18 23:04:57 +00:00
committed by Android (Google) Code Review
+1
View File
@@ -1204,6 +1204,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
if (((initialScrollX >= mMaxScrollX) && (isVelocityXLeft || !isFling)) ||
((initialScrollX <= mMinScrollX) && (!isVelocityXLeft || !isFling))) {
mScroller.springBack(getScrollX(), mMinScrollX, mMaxScrollX);
mNextPage = getPageNearestToCenterOfScreen();
} else {
mScroller.setInterpolator(mDefaultInterpolator);
mScroller.fling(initialScrollX, -velocityX,