Hi,
I need help regarding animation in compose.
I have a svg file and i need to change it color/tint dyanmically.
Full context:
I have svg of lung and i show it like inhale and exhale.
One color is filling from bottom to top and after a delay
I will goes down and fill with default color/new color
How i can achieve this?
c
Chrimaeon
08/17/2024, 12:55 PM
create 2 images that overlay each other and animate the height of the second one.
r
Rohit Jakhar
08/17/2024, 1:06 PM
Is it a good approach?
c
Chrimaeon
08/17/2024, 1:09 PM
how else would you do it? SVG manipulation is not part of compose.
another idea would be an “animation” with Lottie where you can programatically set thee progress of the animation. there is a composeable for lottie files.
r
Rohit Jakhar
08/17/2024, 1:14 PM
Qh gotcha
Thanks
a
Atul Gupta
08/17/2024, 4:17 PM
Can't we do animation on dynamically created SVG in compose? There also used to concept of vector animation in Views though not sure if that will be applicable in compose or not