Hello! Is it possible to add 2-3 gifs on top of ea...
# compose
a
Hello! Is it possible to add 2-3 gifs on top of each other in jetpack compose?
For example, 1 full screen as a background and two small as objects. I found a landscapist library with which it should be possible to place one gif in like ImageView. What else I might need for the task at hand? Thanks!
t
You can put all of them in a
Box
. They will stack on each other
👍 2
👆 3
f
And Coil-Compose is a recommended (not official) Image library. I haven't heard of Landscapist tho
a
Yeah, I placed them in a Box, working fine, just synchronous. I’d prefer them to move in asynchronous way… @Filip Wiesner Here is a landscapist library, it supports animated gifs. They have a coil support there, I use it. https://github.com/skydoves/Landscapist
c
Do you have a video to show what's happening? I don't understand what you mean that it's "working fine, just synchronous"
c
If you’re using Coil, I’d recommend using it’s official Compose support over Landscapist.
a
@Colton Idle Unfortunately I can’t provide a video, but I mean that for example you have a cat which can move its tail from right to left and a human who can move hands from right to left then when you launch an application their movements is synchronous aka moving from left to right. I thought to create some delay between the cats movements and the human ones, so that the whole screen will look more natural. But for now my interest in this particular case is more scientific, I don’t need that behaviour in application anymore.