public class TimeAnimator
extends ValueAnimator

   ↳ androidx.core.animation.Animator
     ↳ androidx.core.animation.ValueAnimator
       ↳ androidx.core.animation.TimeAnimator

This class provides a simple callback mechanism to listeners that is synchronized with all other animators in the system. There is no duration, interpolation, or object value-setting with this Animator. Instead, it is simply started, after which it proceeds to send out events on every animation frame to its TimeListener (if set), with information about this animator, the total elapsed time, and the elapsed time since the previous animation frame.


Nested classes

interface TimeAnimator.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. 

Inherited constants

Public constructors


Public methods

void setCurrentPlayTime(long playTime)

Sets the position of the animation to the specified point in time.

void setTimeListener(TimeAnimator.TimeListener listener)

Sets a listener that is sent update events throughout the life of an animation.

void start()

Starts this animation.

Inherited methods