Say I have a placeholder image url and the actual image url. Is it possible for me to load the placeholder first, and then upon completion load the actual image?
I already tried this without success
Coil.load(context, thumbnail) {
crossfade(true)
target {
setImageDrawable(it)
load(url) { crossfade(true) }
}
}
Placeholders can only be set synchronously at the moment, however you could work around this by chaining two load operations:
Coil.load(context, thumbnail) {
crossfade(true)
target { thumbnailDrawable ->
imageView.load(fullSize) {
crossfade(true)
placeholder(thumbnailDrawable)
}
}
}
I'm tracking support for asynchronous placeholders here: #27
Most helpful comment
Placeholders can only be set synchronously at the moment, however you could work around this by chaining two load operations:
I'm tracking support for asynchronous placeholders here: #27