Skip to content

Instantly share code, notes, and snippets.

@colinrtwhite
Created August 27, 2019 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinrtwhite/baea0bb3b41dfb4f531b5c876ba38239 to your computer and use it in GitHub Desktop.
Save colinrtwhite/baea0bb3b41dfb4f531b5c876ba38239 to your computer and use it in GitHub Desktop.
imageView.load("https://www.example.com/image.jpg") {
listener(
onSuccess = { /** Handle success. */ },
onError = { /** Handle error. */ }
)
}
// Call this inside of your coroutine scope.
// This will throw an error inside of the scope if it fails.
val drawable = Coil.get("https://www.example.com/image.jpg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment