Skip to content

Instantly share code, notes, and snippets.

@rcmkt
Last active September 26, 2019 09:34
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 rcmkt/a174fbc82f1586517d198f67f6866bb7 to your computer and use it in GitHub Desktop.
Save rcmkt/a174fbc82f1586517d198f67f6866bb7 to your computer and use it in GitHub Desktop.
GlideListener.kt
object : RequestListener<Drawable> {
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Drawable>?,
isFirstResource: Boolean
): Boolean {
scheduleStartPostponedTransitions()
return false
}
override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Drawable>?,
dataSource: DataSource?,
isFirstResource: Boolean
): Boolean {
scheduleStartPostponedTransitions()
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment