AnimationBlock
Allows block-style animations to be defined and started. These animations are then grouped and managed by a top-level Animation. Callers are then able to monitor/cancel the entire group using the returned value.
val animations = animate {
innerAnimation1 = 0f to 1f using (tween(...)).invoke {
}
innerAnimation2 = start(customAnimation) {
}
...
}.apply {
completed += ... // called once when all nested animations are done
}
animations.cancel() // cancels all animations started in the block
Content copied to clipboard
Functions
Link copied to clipboard
abstract operator fun <T, V> NumericAnimationPlan<T, V>.invoke(onChange: (T) -> Unit): Animator.NumericAnimationInfo<T, V>
Creates a NumericAnimationInfo for a NumericAnimationPlan.