Add listener to GlideImage #69
Answered
by
skydoves
kaychyka17
asked this question in
Q&A
-
If I noticed correctly there is no possibility to add listener to GlideImage. I'm loading .svg from url and for that SVG listener is needed. Is there any chance this will be added soon? |
Beta Was this translation helpful? Give feedback.
Answered by
skydoves
Oct 8, 2021
Replies: 1 comment 15 replies
-
Hello, you can set the RequestBuilder as following the documentation. GlideImage(
imageModel = poster,
requestBuilder = Glide.with(LocalContext.current.applicationContext).asDrawable()
.listener(object : RequestListener<Drawable> {
override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: Target<Drawable>?,
isFirstResource: Boolean
): Boolean {
TODO("Not yet implemented")
}
override fun onResourceReady(
resource: Drawable?,
model: Any?,
target: Target<Drawable>?,
dataSource: DataSource?,
isFirstResource: Boolean
): Boolean {
TODO("Not yet implemented")
}
}), |
Beta Was this translation helpful? Give feedback.
15 replies
Answer selected by
skydoves
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, you can set the RequestBuilder as following the documentation.