Animations

interface Animations

动画规范的工厂接口,用于创建各种类型的 AnimationSpec

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard

创建一个 InfiniteRepeatableSpec(无限重复动画)。

Link copied to clipboard
abstract fun <T> keyframes(init: KeyframesSpecConfig<T>.() -> Unit): KeyframesSpec<T>

创建一个 KeyframesSpec(关键帧动画)。

Link copied to clipboard
abstract fun <T> repeatable(iterations: Int, animation: DurationBasedAnimationSpec<T>, repeatMode: (RepeatModes) -> RepeatMode): RepeatableSpec<T>

创建一个 RepeatableSpec(可重复动画)。

Link copied to clipboard
abstract fun <T> snap(delayMillis: Int): SnapSpec<T>

创建一个 SnapSpec(快照动画)。

Link copied to clipboard
abstract fun <T> spring(dampingRatio: Float, stiffness: Float, visibilityThreshold: T?): SpringSpec<T>

创建一个基于物理的 SpringSpec(弹簧动画),使用给定的参数。

Link copied to clipboard
abstract fun <T> tween(durationMillis: Int, delayMillis: Int, easing: (Float) -> Float): TweenSpec<T>

创建一个 TweenSpec(补间动画),使用给定的参数。