public 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 methods

float

Returns the system-wide scaling factor for animations.

Public constructors

AnimationHandler

Added in 1.1.0-beta01
public AnimationHandler(@NonNull FrameCallbackScheduler scheduler)

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

Parameters
@NonNull FrameCallbackScheduler scheduler

The scheduler for this handler to run the given runnable.

Public methods

getDurationScale

Added in 1.1.0-beta01
@VisibleForTesting
public float getDurationScale()

Returns the system-wide scaling factor for animations.