mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Tune discovery bounce to be more gentle when bouncing." into ub-launcher3-edmonton
This commit is contained in:
committed by
Android (Google) Code Review
commit
788003e4bf
@@ -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
|
||||
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user