[ Resolved ] Hi, I’m facing issue in animating tra...
# compose
a
[ Resolved ] Hi, I’m facing issue in animating transition in Compose.
Copy code
var mProgress by remember { mutableStateOf(0F) }

val transition = updateTransition(targetState = mProgress, label = "")
Currently, On Button Click, I can easily change mProgress value and view will be animated But I’ve don’t want to animate on Button Clicked, rather the view should be animated as soon as it is displayed in screen. Tried a lot of things but no luck 😞 Any suggestion ?
a
animatedFloatAsState()
?
👀 1
f
You could fire animation in
LaunchedEffect
Copy code
val mProgress = remember { mutableStateOf(0F) }
LaunchedEffect(Unit) {
    mProgress.value = 1f
}
1
a
@fatih Thanks 🙌 This is what I was missing actually 😄
👍 1