any example animation code for loading image ?
# compose
s
any example animation code for loading image ?
t
I assume that you want to download an image an than show it in the UI? I do implemented a image downloader from Scratch. It is not perfect but easy to use. Code is here: https://gitlab.com/timod/compose-playground/-/blob/master/app/src/main/java/com/example/composeplayground/ComplexImageListTest.kt It is a little bit more complex because in practice you want also caching. But it is all there: https://gitlab.com/timod/compose-playground/-/blob/master/app/src/main/java/de/appsonair/compose/ImageLoader.kt
n
@Socheat KHAUV I’m using this lib created by @cb. It has the crossfade effect out of the box. https://github.com/chrisbanes/accompanist/tree/main/coil
Copy code
CoilImageWithCrossfade(
    data = "<https://loremflickr.com/300/300>"
)