Last active
February 7, 2023 22:15
-
-
Save ademirqueiroga/77c2bb3307800e03dae6e1c11c620609 to your computer and use it in GitHub Desktop.
AwesomeTransportControlGlue set image bitmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Glide.with(context) | |
.asBitmap() | |
.load(movie.cardImageUrl) | |
.into(object : CustomTarget<Bitmap>() { | |
override fun onResourceReady(bitmap: Bitmap, t: Transition<in Bitmap>?) { | |
controlsRow.setImageBitmap(context, bitmap) | |
host.notifyPlaybackRowChanged() | |
} | |
override fun onLoadCleared(placeholder: Drawable?) { | |
controlsRow.setImageBitmap(context, null) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment