mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Fix small scrolling regression
-> only cancel scrolling when necessary to avoid unnecessary snapToDestination() calls Change-Id: I406bef2453c88d61d25f66be67205ab8fbd69ec9
This commit is contained in:
@@ -1368,10 +1368,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
*/
|
||||
final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX());
|
||||
final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop);
|
||||
|
||||
if (finishedScrolling) {
|
||||
mTouchState = TOUCH_STATE_REST;
|
||||
mScrollAbortedFromIntercept = true;
|
||||
abortScrollerAnimation(false);
|
||||
if (!mScroller.isFinished()) {
|
||||
mScrollAbortedFromIntercept = true;
|
||||
abortScrollerAnimation(false);
|
||||
}
|
||||
} else {
|
||||
if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
|
||||
mTouchState = TOUCH_STATE_SCROLLING;
|
||||
|
||||
Reference in New Issue
Block a user