Loading src/com/android/launcher3/PagedView.java +8 −6 Original line number Diff line number Diff line Loading @@ -519,12 +519,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc forceFinishScroller(); } private void abortScrollerAnimation() { private void abortScrollerAnimation(boolean resetNextPage) { mScroller.abortAnimation(); // We need to clean up the next page here to avoid computeScrollHelper from // updating current page on the pass. if (resetNextPage) { mNextPage = INVALID_PAGE; } } private void forceFinishScroller() { mScroller.forceFinished(true); Loading @@ -538,7 +540,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc */ void setCurrentPage(int currentPage) { if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(true); } // don't introduce any checks like mCurrentPage == currentPage here-- if we change the // the default Loading Loading @@ -1372,7 +1374,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop); if (finishedScrolling) { mTouchState = TOUCH_STATE_REST; abortScrollerAnimation(); abortScrollerAnimation(false); } else { if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) { mTouchState = TOUCH_STATE_SCROLLING; Loading Loading @@ -1671,7 +1673,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc * will be false if being flinged. */ if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(false); } // Remember where the motion event started Loading Loading @@ -1869,7 +1871,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc } } else { if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(true); } float scaleX = getScaleX(); Loading Loading
src/com/android/launcher3/PagedView.java +8 −6 Original line number Diff line number Diff line Loading @@ -519,12 +519,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc forceFinishScroller(); } private void abortScrollerAnimation() { private void abortScrollerAnimation(boolean resetNextPage) { mScroller.abortAnimation(); // We need to clean up the next page here to avoid computeScrollHelper from // updating current page on the pass. if (resetNextPage) { mNextPage = INVALID_PAGE; } } private void forceFinishScroller() { mScroller.forceFinished(true); Loading @@ -538,7 +540,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc */ void setCurrentPage(int currentPage) { if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(true); } // don't introduce any checks like mCurrentPage == currentPage here-- if we change the // the default Loading Loading @@ -1372,7 +1374,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop); if (finishedScrolling) { mTouchState = TOUCH_STATE_REST; abortScrollerAnimation(); abortScrollerAnimation(false); } else { if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) { mTouchState = TOUCH_STATE_SCROLLING; Loading Loading @@ -1671,7 +1673,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc * will be false if being flinged. */ if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(false); } // Remember where the motion event started Loading Loading @@ -1869,7 +1871,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc } } else { if (!mScroller.isFinished()) { abortScrollerAnimation(); abortScrollerAnimation(true); } float scaleX = getScaleX(); Loading