Animator

public abstract class Animator

Known direct subclasses
AnimatorSet

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

ValueAnimator

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

Known indirect subclasses
ObjectAnimator

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

TimeAnimator

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


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

Summary

Nested types

Animator.AnimatorListener

An animation listener receives notifications from an animation.

Animator.AnimatorPauseListener

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

Animator.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.

Constants

static final long

The value used to indicate infinite duration (e.g.

Public constructors

Public methods

void

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

void

Adds a pause listener to this animator.

void

Adds a listener to the set of listeners that are sent update events through the life of an animation.

void

Cancels the animation.

@NonNull @Override Animator
void
end()

Ends the animation.

abstract long

Gets the duration of the animation.

@Nullable