Skip to content

Commit

Permalink
[Predictive Back] Update predictive back animations to use interpolat…
Browse files Browse the repository at this point in the history
…ion curve of (0.1, 0.1, 0, 1)

PiperOrigin-RevId: 625671874
  • Loading branch information
dsn5ft authored and imhappi committed Apr 17, 2024
1 parent c600b38 commit 136a685
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -42,7 +42,9 @@ public abstract class MaterialBackAnimationHelper<V extends View> {
private static final int HIDE_DURATION_MIN_DEFAULT = 150;
private static final int CANCEL_DURATION_DEFAULT = 100;

@NonNull private final TimeInterpolator progressInterpolator;
@NonNull
private final TimeInterpolator progressInterpolator =
PathInterpolatorCompat.create(0.1f, 0.1f, 0, 1);

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

Context context = view.getContext();
progressInterpolator =
MotionUtils.resolveThemeInterpolator(
context,
R.attr.motionEasingStandardDecelerateInterpolator,
PathInterpolatorCompat.create(0, 0, 0, 1));
hideDurationMax =
MotionUtils.resolveThemeDuration(
context, R.attr.motionDurationMedium2, HIDE_DURATION_MAX_DEFAULT);
Expand Down

0 comments on commit 136a685

Please sign in to comment.