Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

AnimationUtils

public class AnimationUtils
extends Object

java.lang.Object
   ↳ com.google.android.material.animation.AnimationUtils


Utility class for animations containing Material interpolators.

Summary

Fields

public static final TimeInterpolator DECELERATE_INTERPOLATOR

public static final TimeInterpolator FAST_OUT_LINEAR_IN_INTERPOLATOR

public static final TimeInterpolator FAST_OUT_SLOW_IN_INTERPOLATOR

public static final TimeInterpolator LINEAR_INTERPOLATOR

public static final TimeInterpolator LINEAR_OUT_SLOW_IN_INTERPOLATOR

Public constructors

AnimationUtils()

Public methods

static float lerp(float startValue, float endValue, float fraction)

Linear interpolation between startValue and endValue by fraction.

static int lerp(int startValue, int endValue, float fraction)

Linear interpolation between startValue and endValue by fraction.

Inherited methods

From class java.lang.Object

Fields

DECELERATE_INTERPOLATOR

TimeInterpolator DECELERATE_INTERPOLATOR

FAST_OUT_LINEAR_IN_INTERPOLATOR

TimeInterpolator FAST_OUT_LINEAR_IN_INTERPOLATOR

FAST_OUT_SLOW_IN_INTERPOLATOR

TimeInterpolator FAST_OUT_SLOW_IN_INTERPOLATOR

LINEAR_INTERPOLATOR

TimeInterpolator LINEAR_INTERPOLATOR

LINEAR_OUT_SLOW_IN_INTERPOLATOR

TimeInterpolator LINEAR_OUT_SLOW_IN_INTERPOLATOR

Public constructors

AnimationUtils

AnimationUtils ()

Public methods

lerp

float lerp (float startValue, 
                float endValue, 
                float fraction)

Linear interpolation between startValue and endValue by fraction.

Parameters
startValue float

endValue float

fraction float

Returns
float

lerp

int lerp (int startValue, 
                int endValue, 
                float fraction)

Linear interpolation between startValue and endValue by fraction.

Parameters
startValue int

endValue int

fraction float

Returns
int