Skip to content

Add listener to GlideImage #69

Answered by skydoves
kaychyka17 asked this question in Q&A
Discussion options

You must be logged in to vote

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 {…

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@jennatauro
Comment options

@jennatauro
Comment options

@skydoves
Comment options

@jennatauro
Comment options

@skydoves
Comment options

Answer selected by skydoves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants