what is the equivalent of ValueAnimator on jetpack...
# compose
m
what is the equivalent of ValueAnimator on jetpack compose?
r
I would recommend you check out this guide if you haven’t already: https://developer.android.com/jetpack/compose/animation
animateFloatAsState
might be what you want
m
I have already read but i cant implement what i want.I want to animate value from 0f to 360f in 1000 ms and one time.
I tried animateFloatAsState but condition required .I havent condition true or false.
z
sounds like you want
Animatable
.
🙌 1
probably with a
tween
AnimationSpec
🙌 1
l
Copy code
val animation = remember { Animatable(0f) }
LaunchedEffect(animation) {
    animation.animateTo(
        360f,
        animationSpec = tween(durationMillis = 1000)
    )
}
👀 1
3
🙌 2
m
Thank you all for helping.I have been busy for hours, but I have missed this part of the documentation.Thank you again i solved