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

TimeAnimator

open class TimeAnimator : ValueAnimator
kotlin.Any
   ↳ 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.

Summary

Nested classes
abstract

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

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

Public methods
open Unit

open Unit

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

open Unit

Inherited functions

Public constructors

<init>

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.

Public methods

setCurrentPlayTime

open fun setCurrentPlayTime(playTime: Long): Unit

setTimeListener

open fun setTimeListener(@Nullable listener: TimeAnimator.TimeListener?): Unit

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

Parameters
listener TimeAnimator.TimeListener?: the listener to be set.

start

open fun start(): Unit