Skip to content

Commit 136a685

Browse files
dsn5ftimhappi
authored andcommitted
[Predictive Back] Update predictive back animations to use interpolation curve of (0.1, 0.1, 0, 1)
PiperOrigin-RevId: 625671874
1 parent c600b38 commit 136a685

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/java/com/google/android/material/motion/MaterialBackAnimationHelper.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public abstract class MaterialBackAnimationHelper<V extends View> {
4242
private static final int HIDE_DURATION_MIN_DEFAULT = 150;
4343
private static final int CANCEL_DURATION_DEFAULT = 100;
4444

45-
@NonNull private final TimeInterpolator progressInterpolator;
45+
@NonNull
46+
private final TimeInterpolator progressInterpolator =
47+
PathInterpolatorCompat.create(0.1f, 0.1f, 0, 1);
4648

4749
@NonNull protected final V view;
4850
protected final int hideDurationMax;
@@ -55,11 +57,6 @@ public MaterialBackAnimationHelper(@NonNull V view) {
5557
this.view = view;
5658

5759
Context context = view.getContext();
58-
progressInterpolator =
59-
MotionUtils.resolveThemeInterpolator(
60-
context,
61-
R.attr.motionEasingStandardDecelerateInterpolator,
62-
PathInterpolatorCompat.create(0, 0, 0, 1));
6360
hideDurationMax =
6461
MotionUtils.resolveThemeDuration(
6562
context, R.attr.motionDurationMedium2, HIDE_DURATION_MAX_DEFAULT);

0 commit comments

Comments
 (0)