Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

androidx.core.animation

Interfaces

AnimatorListener

An animation listener receives notifications from an animation.

AnimatorPauseListener

A pause listener receives notifications from an animation when the animation is paused or resumed.

AnimatorUpdateListener

Implementors of this interface can add themselves as update listeners to an ValueAnimator instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that ValueAnimator.

Interpolator

An interpolator defines the rate of change of an animation.

TimeListener

Implementors of this interface can set themselves as update listeners to a TimeAnimator instance to receive callbacks on every animation frame to receive the total time since the animator started and the delta time since the last frame.

TypeEvaluator

Interface for use with the ValueAnimator#setEvaluator(TypeEvaluator) function.

Classes

AccelerateDecelerateInterpolator

An interpolator where the rate of change starts and ends slowly but accelerates through the middle.

AccelerateInterpolator

An interpolator where the rate of change starts out slowly and and then accelerates.

Animator

This is the superclass for classes which provide basic support for animations which can be started, ended, and have AnimatorListeners added to them.

AnimatorInflater

This class is used to instantiate animator XML files into Animator objects.

AnimatorListenerAdapter

This adapter class provides empty implementations of the methods from Animator.AnimatorListener.

AnimatorSet

This class plays a set of Animator objects in the specified order.

AnimatorTestRule

JUnit TestRule that can be used to run Animators without actually waiting for the duration of the animation.

AnticipateInterpolator

An interpolator where the change starts backward then flings forward.

AnticipateOvershootInterpolator

An interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value.

ArgbEvaluator

This evaluator can be used to perform type interpolation between integer values that represent ARGB colors.

BidirectionalTypeConverter

Abstract base class used convert type T to another type V and back again.

BounceInterpolator

An interpolator where the change bounces at the end.

CycleInterpolator

Repeats the animation for a specified number of cycles.

DecelerateInterpolator

An interpolator where the rate of change starts out quickly and and then decelerates.

FloatArrayEvaluator

This evaluator can be used to perform type interpolation between float[] values.

FloatEvaluator

This evaluator can be used to perform type interpolation between float values.

FloatProperty

An implementation of android.util.Property to be used specifically with fields of type float.

IntArrayEvaluator

This evaluator can be used to perform type interpolation between int[] values.

IntEvaluator

This evaluator can be used to perform type interpolation between int values.

IntProperty

An implementation of android.util.Property to be used specifically with fields of type int.

Keyframe

This class holds a time/value pair for an animation.

LinearInterpolator

An interpolator where the rate of change is constant

ObjectAnimator

This subclass of ValueAnimator provides support for animating properties on target objects.

OvershootInterpolator

An interpolator where the change flings forward and overshoots the last value then comes back.

PathInterpolator

An interpolator that can traverse a Path that extends from Point(0, 0) to (1, 1).

PointFEvaluator

This evaluator can be used to perform type interpolation between PointF values.

PropertyValuesHolder

This class holds information about a property and the values that that property should take on during an animation.

RectEvaluator

This evaluator can be used to perform type interpolation between Rect values.

TimeAnimator

This class provides a simple callback mechanism to listeners that is synchronized with all other animators in the system.

TypeConverter

Abstract base class used convert type T to another type V.

ValueAnimator

This class provides a simple timing engine for running animations which calculate animated values and set them on target objects.

Extension functions summary

For android.animation.Animator
AnimatorListener
Animator.addListener(crossinline onEnd: (animator: Animator) -> Unit = {}, crossinline onStart: (animator: Animator) -> Unit = {}, crossinline onCancel: (animator: Animator) -> Unit = {}, crossinline onRepeat: (animator: Animator) -> Unit = {})

Add a listener to this Animator using the provided actions.

AnimatorPauseListener
Animator.addPauseListener(crossinline onResume: (animator: Animator) -> Unit = {}, crossinline onPause: (animator: Animator) -> Unit = {})

Add a pause and resume listener to this Animator using the provided actions.

AnimatorListener
Animator.doOnCancel(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has been cancelled.

AnimatorListener
Animator.doOnEnd(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has ended.

AnimatorPauseListener
Animator.doOnPause(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has been paused.

AnimatorListener
Animator.doOnRepeat(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has repeated.

AnimatorPauseListener
Animator.doOnResume(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has resumed after a pause.

AnimatorListener
Animator.doOnStart(crossinline action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has started.

Extension functions

addListener

inline fun Animator.addListener(
    crossinline onEnd: (animator: Animator) -> Unit = {},
    crossinline onStart: (animator: Animator) -> Unit = {},
    crossinline onCancel: (animator: Animator) -> Unit = {},
    crossinline onRepeat: (animator: Animator) -> Unit = {}
): AnimatorListener

Add a listener to this Animator using the provided actions.

Return
the Animator.AnimatorListener added to the Animator

addPauseListener

@RequiresApi(19) inline fun Animator.addPauseListener(
    crossinline onResume: (animator: Animator) -> Unit = {},
    crossinline onPause: (animator: Animator) -> Unit = {}
): AnimatorPauseListener

Add a pause and resume listener to this Animator using the provided actions.

Return
the Animator.AnimatorPauseListener added to the Animator

doOnCancel

inline fun Animator.doOnCancel(crossinline action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has been cancelled.

Return
the Animator.AnimatorListener added to the Animator

See Also

doOnEnd

inline fun Animator.doOnEnd(crossinline action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has ended.

Return
the Animator.AnimatorListener added to the Animator

See Also

doOnPause

@RequiresApi(19) inline fun Animator.doOnPause(crossinline action: (animator: Animator) -> Unit): AnimatorPauseListener

Add an action which will be invoked when the animation has been paused.

Return
the Animator.AnimatorPauseListener added to the Animator

See Also

doOnRepeat

inline fun Animator.doOnRepeat(crossinline action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has repeated.

Return
the Animator.AnimatorListener added to the Animator

doOnResume

@RequiresApi(19) inline fun Animator.doOnResume(crossinline action: (animator: Animator) -> Unit): AnimatorPauseListener

Add an action which will be invoked when the animation has resumed after a pause.

Return
the Animator.AnimatorPauseListener added to the Animator

See Also

doOnStart

inline fun Animator.doOnStart(crossinline action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has started.

Return
the Animator.AnimatorListener added to the Animator

See Also