Currently struggling with simple animations. If so...
# compose
d
Currently struggling with simple animations. If someone can take a look at SO question: https://stackoverflow.com/questions/66971191/android-compose-animation-like-horizontal-progress-indicator Any help appreciated 🙏
z
I don’t know the transition apis very well, but just a guess – you’re passing the same label in for all the transitions in your loop – if that label is used as a key internally, they might be clobbering each other. What if you add the index to the label?
d
index added to both labels, but still not working as expected. The SingleProgress is animating as expected, but not the MultipleProgress (any of them) 😕
g
I think the issue is in the weight value. If you try the MultipleProgress with 2 values, and changing the
Copy code
val weight = if (progressTransition.value < 100/2)  1-progressTransition.value
else progressTransition.value
it works because you have homogeneous delta between the 2 values. With 3 values it is not true.