Skip to content

Instantly share code, notes, and snippets.

@ademirqueiroga
Last active February 7, 2023 22:15
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 ademirqueiroga/77c2bb3307800e03dae6e1c11c620609 to your computer and use it in GitHub Desktop.
Save ademirqueiroga/77c2bb3307800e03dae6e1c11c620609 to your computer and use it in GitHub Desktop.
AwesomeTransportControlGlue set image bitmap
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