Is there an easy / simple way to add some delay to:
val animatedColor by animateColorAsState(
if (isPlaying) Color.Transparent else MaterialTheme.colorScheme.surface,
)
t
Tobias Gronbach
04/04/2022, 12:18 AM
val animatedColor by animateColorAsState(
if (isPlaying) Color.Transparent else MaterialTheme.colorScheme.surface,
animationSpec = tween(
durationMillis = 2000,
delayMillis = 1000,
easing = LinearOutSlowInEasing
)
)
t
Tolriq
04/04/2022, 6:15 AM
Thanks that's what I ended up doing but the default animation is spring and it does not have the delay so I need to change the others to match too. Was wondering if there was some more generic way.