class AnimationHandler


This custom handler handles the timing pulse that is shared by all active ValueAnimators. This approach ensures that the setting of animation values will happen on the same thread that animations start on, and that all animations will share the same times for calculating their values, which makes synchronizing animations possible. The handler uses the Choreographer by default for doing periodic callbacks. A custom AnimationFrameCallbackProvider can be set on the handler to provide timing pulse that may be independent of UI frame update. This could be useful in testing.

Summary

Public constructors

The constructor of the AnimationHandler with FrameCallbackScheduler which is handle running the given Runnable on the next frame.

Public functions

Float

Returns the system-wide scaling factor for animations.

Public constructors

AnimationHandler

Added in 1.1.0-beta01
AnimationHandler(scheduler: FrameCallbackScheduler)

The constructor of the AnimationHandler with FrameCallbackScheduler which is handle running the given Runnable on the next frame.

Parameters
scheduler: FrameCallbackScheduler

The scheduler for this handler to run the given runnable.

Public functions

getDurationScale

Added in 1.1.0-beta01
@VisibleForTesting
fun getDurationScale(): Float

Returns the system-wide scaling factor for animations.