Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c4fa104 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Tune discovery bounce to be more gentle when bouncing.

Change-Id: I6b1c094bbcd07bfda76bcc2c6b2a6fb249acd377
Fixes: 79491740
Test: Manual test
parent 04bf5480
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -26,14 +26,14 @@
            android:fraction="0"
            android:value="1f" />
        <keyframe
            android:fraction="0.346"
            android:fraction="0.246"
            android:value="1f" />
        <keyframe
            android:fraction=".423"
            android:interpolator="@interpolator/disco_bounce"
            android:value="0.9438f" />
            android:value="0.9738f" />
        <keyframe
            android:fraction="0.654"
            android:fraction="0.754"
            android:interpolator="@interpolator/disco_bounce"
            android:value="1f" />
        <keyframe
+3 −3
Original line number Diff line number Diff line
@@ -156,14 +156,14 @@ public class DiscoveryBounce extends AbstractFloatingView {
        float verticalProgress = OVERVIEW.getVerticalProgress(launcher);

        TimeInterpolator pathInterpolator = new PathInterpolator(0.35f, 0, 0.5f, 1);
        Keyframe keyframe3 = Keyframe.ofFloat(0.423f, verticalProgress - (1 - 0.9438f));
        Keyframe keyframe3 = Keyframe.ofFloat(0.423f, verticalProgress - (1 - 0.9738f));
        keyframe3.setInterpolator(pathInterpolator);
        Keyframe keyframe4 = Keyframe.ofFloat(0.654f, verticalProgress);
        Keyframe keyframe4 = Keyframe.ofFloat(0.754f, verticalProgress);
        keyframe4.setInterpolator(pathInterpolator);

        PropertyValuesHolder propertyValuesHolder = PropertyValuesHolder.ofKeyframe("progress",
                Keyframe.ofFloat(0, verticalProgress),
                Keyframe.ofFloat(0.346f, verticalProgress), keyframe3, keyframe4,
                Keyframe.ofFloat(0.246f, verticalProgress), keyframe3, keyframe4,
                Keyframe.ofFloat(1f, verticalProgress));
        ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(null,
                new PropertyValuesHolder[]{propertyValuesHolder});