nonameden
07/30/2021, 4:31 AMval transition = rememberInfiniteTransition()
val value = transition.animateFloat(
0.5f,
1f,
infiniteRepeatable(
repeatMode = RepeatMode.Reverse,
animation = tween(
durationMillis = 650,
delayMillis = 160,
easing = BezierEasing
)
)
)
it applies delay on each iterate, is there any legit way to delay only first iterate? like startDelay in ValueAnimator?Doris Liu
07/30/2021, 5:25 AMdelay(...)
in a `LaunchedEffect`:
LaunchedEffect(Unit) {
delay(..)
animate(0.5f, 1f, animationSpec = infiniteRepeatable(..)) {value, _ ->
// do something with the value
}
}
Doris Liu
07/30/2021, 5:28 AMnonameden
07/30/2021, 8:28 AMDoris Liu
07/30/2021, 6:11 PMCoroutineScope
provided by `LaunchedEffect`:
LaunchedEffect(Unit) {
launch {
delay(..)
animate(..)
}
launch {
delay(..)
animate(..)
}
launch {
...
}
}
nonameden
07/30/2021, 9:12 PMDoris Liu
07/31/2021, 2:00 AM