JCB IL - How to use Coil to load remote image?

PHOTO EMBED

Mon Oct 04 2021 10:36:56 GMT+0000 (UTC)

Saved by @GoodRequest. #kotlin

val painter = rememberImagePainter(
    data = url,
    builder = {
        crossfade(true) //Crossfade animation between images
        placeholder(R.drawable.ic_image_loading) //Used while loading
        fallback(R.drawable.ic_empty) //Used if data is null
        error(R.drawable.ic_empty) //Used when loading returns with error
    }
)
content_copyCOPY