repeatable

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

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

Return

返回一个 RepeatableSpec 实例。

Parameters

iterations

重复的总次数。

animation

需要重复的 DurationBasedAnimationSpec

repeatMode

一个选择重复模式的函数。它接收一个 RepeatModes 实例,您需要从中返回所需的模式,例如 it.getRestart()