AnimationHandler
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 |
|---|
AnimationHandler(scheduler: FrameCallbackScheduler)The constructor of the AnimationHandler with |
Public functions |
|
|---|---|
Float |
Returns the system-wide scaling factor for animations. |
Public constructors
AnimationHandler
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
@VisibleForTesting
fun getDurationScale(): Float
Returns the system-wide scaling factor for animations.