https://kotlinlang.org logo
#android
Title
# android
t

tseisel

05/16/2019, 9:31 AM
I am trying to write an extension for integrating
Glide
with coroutines :
Copy code
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
or some existing adapter from kotlinx.corotuines for example
83 Views