Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- launch(UI) {
- val bitmapDrawable = loadLargeBitmapDrawable()
- imageView.setImageDrawable(bitmapDrawable)
- }
- launch { // <- I removed the "UI"
- val bitmapDrawable = loadLargeBitmapDrawable()
- launch(UI) { //Launch the UI coroutine inside the other
- imageView.setImageDrawable(bitmapDrawable)
- }
- }
- launch(UI) {
- val bitmapDrawable = withContext(CommonPool) {
- loadLargeBitmapDrawable()
- }
- imageView.setImageDrawable(bitmapDrawable)
- }
Add Comment
Please, Sign In to add comment