Animatable

Imperative wrapper around AnimatedValue.

Unlike useAnimatedValue, callers drive an Animatable explicitly from event handlers and bind callbacks via animateTo, snapTo, and stop.

Properties

Link copied to clipboard

True if an animation is actively running.

Link copied to clipboard
val value: Value<T>

The current animated value, suitable for passing to Style.* APIs.

Functions

Link copied to clipboard

Starts an animation toward target using spec. Must be called on the main thread.

Link copied to clipboard
fun snapTo(target: T)

Immediately sets the value to target without animation. Must be called on the main thread.

Link copied to clipboard

Stops the current animation at its present value. Must be called on the main thread.