Can we replace `ValueAnimator` with some function ...
# compose
g
Can we replace
ValueAnimator
with some function from compose, or we still have to use it? In my case I need to show
CircularProgressIndicator
animation from 0% to 100% with 500ms duration triggered by button click
m
Take a look at the samples in
CircularProgressIndicator
documentation. I think they highlight your usecase perfectly.
g
I don't think it's what i need. For example, at the beginning I have `x`%, after clicking I want to instantly set 0% and then animate the change from 0% to 100%.
animate
just doesn't let me set values instantly, it animates all changes.
l
If you need more finely grained control you can use an
animatedFloat
instead of
animate
👍 1