suspend fun RequestBuilder<Bitmap>.intoBitmap(width: Int, height: Int): Bitmap?
I expect that function to :
1. load a
Bitmap
(or
Drawable
) with the specified dimensions,
2. suspend until loaded (be it successful or failed),
3. gracefully handle cancellation.
Do you have any guidance, or maybe a library that already does that ?
g
gildor
05/16/2019, 9:32 AM
Check coroutine docs about writing coroutine adapters for asyncronous API
gildor
05/16/2019, 9:32 AM
or some existing adapter from kotlinx.corotuines for example