AnimatorImpl

class AnimatorImpl(timer: Timer, animationScheduler: AnimationScheduler) : Animator(source)

Animator implementation that uses a Timer and AnimationScheduler.

Parameters

timer

used to track elapsed time

animationScheduler

that drives the overall ticking of the animator

Constructors

Link copied to clipboard
constructor(timer: Timer, animationScheduler: AnimationScheduler)

Properties

Link copied to clipboard
open override val listeners: Pool<Animator.Listener>

Listeners that are notified of changes to the Animator's running animations

Functions

Link copied to clipboard
open operator override fun invoke(definitions: Animator.AnimationBlock.() -> Unit): Animation<Any>

Allows block-style animations to be defined and started.

open operator override fun <T> invoke(animation: AnimationPlan<T>, onChanged: (T) -> Unit): Animation<T>

Starts the given animation and notifies of changes to the underlying value via onChanged.

Inherited functions

Link copied to clipboard
operator fun <V, T, K> Animator.invoke(default: T, using: NumericAnimationPlan<T, K>, onChanged: (old: T, new: T) -> Unit = { _,_ -> }): ReadWriteProperty<V, T>

Defines a property that can be animated using the given animation.

operator fun <T, V> Animator.invoke(range: Pair<T, T>, using: NumericAnimationPlan<T, V>, onChanged: (T) -> Unit): Animation<T>

Starts an animation from range.first to range.second.