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

Commit 47cb9a21 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11206181 from 3a35bfcb to 24Q1-release

Change-Id: I7a9b3f1193d706cfac491a76fd114a181db40135
parents 63d1868a 3a35bfcb
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -45,6 +45,14 @@ public class Interpolators {
     */
    public static final Interpolator EMPHASIZED = createEmphasizedInterpolator();

    /**
     * Complement to {@link #EMPHASIZED}. Used when animating hero movement in two dimensions to
     * create a smooth, emphasized, curved movement.
     * <br>
     * Example usage: Animate y-movement with {@link #EMPHASIZED} and x-movement with this.
     */
    public static final Interpolator EMPHASIZED_COMPLEMENT = createEmphasizedComplement();

    /**
     * The accelerated emphasized interpolator. Used for hero / emphasized movement of content that
     * is disappearing e.g. when moving off screen.
@@ -311,6 +319,18 @@ public class Interpolators {
        return new PathInterpolator(path);
    }

    /**
     * Creates a complement to {@link #createEmphasizedInterpolator()} for use when animating in
     * two dimensions.
     */
    private static PathInterpolator createEmphasizedComplement() {
        Path path = new Path();
        path.moveTo(0f, 0f);
        path.cubicTo(0.1217f, 0.0462f, 0.15f, 0.4686f, 0.1667f, 0.66f);
        path.cubicTo(0.1834f, 0.8878f, 0.1667f, 1f, 1f, 1f);
        return new PathInterpolator(path);
    }

    /**
     * Returns a function that runs the given interpolator such that the entire progress is set
     * between the given bounds. That is, we set the interpolation to 0 until lowerBound and reach
+20 −0
Original line number Diff line number Diff line
@@ -52,6 +52,14 @@ public class InterpolatorsAndroidX {
     */
    public static final Interpolator EMPHASIZED = createEmphasizedInterpolator();

    /**
     * Complement to {@link #EMPHASIZED}. Used when animating hero movement in two dimensions to
     * create a smooth, emphasized, curved movement.
     * <br>
     * Example usage: Animate y-movement with {@link #EMPHASIZED} and x-movement with this.
     */
    public static final Interpolator EMPHASIZED_COMPLEMENT = createEmphasizedComplement();

    /**
     * The accelerated emphasized interpolator. Used for hero / emphasized movement of content that
     * is disappearing e.g. when moving off screen.
@@ -317,6 +325,18 @@ public class InterpolatorsAndroidX {
        return new PathInterpolator(path);
    }

    /**
     * Creates a complement to {@link #createEmphasizedInterpolator()} for use when animating in
     * two dimensions.
     */
    private static PathInterpolator createEmphasizedComplement() {
        Path path = new Path();
        path.moveTo(0f, 0f);
        path.cubicTo(0.1217f, 0.0462f, 0.15f, 0.4686f, 0.1667f, 0.66f);
        path.cubicTo(0.1834f, 0.8878f, 0.1667f, 1f, 1f, 1f);
        return new PathInterpolator(path);
    }

    /**
     * Returns a function that runs the given interpolator such that the entire progress is set
     * between the given bounds. That is, we set the interpolation to 0 until lowerBound and reach