Is it possible to use animate vector drawables in desktop (vectorXmlResource)?
i
Igor Demin
04/28/2021, 5:18 PM
Unfortunately, no.
animatedVectorResource
is available only for android.
The possible alternative is to use Lottie animations. And load them with Skija.
There is also a snippet that shows how to load Gif animations in Compose.
Lottie animations would have a similar implementation (didn't tried, but maybe this snippet can load Lottie animations too).
o
olonho
04/28/2021, 5:26 PM
we hopefully will have implementation for such generic composable soon
j
Javier
04/28/2021, 5:40 PM
@Igor Demin I asked in the Lottie GitHub repo and Lottie is not supported in Desktop Compose. Should be great that Skija approach could be integrated some day. I will try it manually.
@olonho yeah, I searched in Gerrit to see if it was multiplatform, jvm or Android, I checked the samples too and there is an expect/actual approach for not animated drawables, sound great that a common composable is planned, hope for both, animated and not animated drawables.
i
Igor Demin
04/28/2021, 5:43 PM
Lottie GitHub repo and Lottie is not supported in Desktop Compose
Officially by Lottie team there is no support. But there is a support by skia/skija
Igor Demin
04/28/2021, 5:44 PM
common composable is planned, hope for both, animated and not animated drawables.
Nikolay talks about not animated drawable's, but about generic support of skia codecs. Skia codecs don't support android vector drawables.
Igor Demin
04/28/2021, 5:46 PM
But we can investigate this in the future, can we support animated android drawables