Skip to content

Commit a181bb4

Browse files
author
Justin Ho
committed
Tuning Overscroller's scroll curve
Softer end + rounder curve with less contrast Bug: 5200575 Change-Id: Icff6ba3cf7ae052c80b2e80e2d2b07085fcb40ce
1 parent 4f92c9b commit a181bb4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/java/android/widget/OverScroller.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@ static class SplineOverScroller {
584584
// A device specific coefficient adjusted to physical values.
585585
private static float PHYSICAL_COEF;
586586

587-
private static float DECELERATION_RATE = (float) (Math.log(0.75) / Math.log(0.9));
588-
private static final float INFLEXION = 0.4f; // Tension lines cross at (INFLEXION, 1)
589-
private static final float START_TENSION = 1.0f;
590-
private static final float END_TENSION = 0.6666f;
587+
private static float DECELERATION_RATE = (float) (Math.log(0.78) / Math.log(0.9));
588+
private static final float INFLEXION = 0.35f; // Tension lines cross at (INFLEXION, 1)
589+
private static final float START_TENSION = 0.5f;
590+
private static final float END_TENSION = 1.0f;
591591
private static final float P1 = START_TENSION * INFLEXION;
592592
private static final float P2 = 1.0f - END_TENSION * (1.0f - INFLEXION);
593593

0 commit comments

Comments
 (0)