mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Disabling page fling while the overlay is moving
Bug: 37959201 Change-Id: I2278a46d10bc81855e10f97e669460e0d0b93daa
This commit is contained in:
@@ -1599,7 +1599,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
mTotalMotionX += Math.abs(mLastMotionX + mLastMotionXRemainder - x);
|
||||
|
||||
boolean isFling = mTotalMotionX > MIN_LENGTH_FOR_FLING &&
|
||||
Math.abs(velocityX) > mFlingThresholdVelocity;
|
||||
shouldFlingForVelocity(velocityX);
|
||||
|
||||
if (!mFreeScroll) {
|
||||
// In the case that the page is moved far to one direction and then is flung
|
||||
@@ -1705,6 +1705,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean shouldFlingForVelocity(int velocityX) {
|
||||
return Math.abs(velocityX) > mFlingThresholdVelocity;
|
||||
}
|
||||
|
||||
private void resetTouchState() {
|
||||
releaseVelocityTracker();
|
||||
endReordering();
|
||||
|
||||
Reference in New Issue
Block a user