Disabling page fling while the overlay is moving

Bug: 37959201
Change-Id: I2278a46d10bc81855e10f97e669460e0d0b93daa
This commit is contained in:
Sunny Goyal committed 2017-05-08 12:10:32 -07:00
1 parent 0e261d56a7
commit 65d9ceb383
2 files changed
+12 -1

No files matched your search

+7
View File
@@ -1462,6 +1462,13 @@ public class Workspace extends PagedView
}
}
@Override
protected boolean shouldFlingForVelocity(int velocityX) {
// When the overlay is moving, the fling or settle transition is controlled by the overlay.
return Float.compare(mOverlayTranslation, 0) == 0 &&
super.shouldFlingForVelocity(velocityX);
}
private final Interpolator mAlphaInterpolator = new DecelerateInterpolator(3f);
/**