am 7bfc9795: Clamping maximum overscroll amount
* commit '7bfc979594b083c36f6a08e49273ef7c9ad7b13a': Clamping maximum overscroll amount
This commit is contained in:
@@ -879,6 +879,11 @@ public abstract class PagedView extends ViewGroup {
|
||||
if (f == 0) return;
|
||||
f = f / (Math.abs(f)) * (overScrollInfluenceCurve(Math.abs(f)));
|
||||
|
||||
// Clamp this factor, f, to -1 < f < 1
|
||||
if (Math.abs(f) >= 1) {
|
||||
f /= Math.abs(f);
|
||||
}
|
||||
|
||||
int overScrollAmount = (int) Math.round(OVERSCROLL_DAMP_FACTOR * f * screenSize);
|
||||
if (amount < 0) {
|
||||
mScrollX = overScrollAmount;
|
||||
|
||||
Reference in New Issue
Block a user