I want to load a gif into an imageview, it is displayed but doesn't start playing. I use this code:
Glide.with(context)
.load("https://media.giphy.com/media/7rj2ZgttvgomY/giphy.gif")
.into(imageView)
I've also tried adding .asGif()
but in that case image is not displayed at all. I'm using glide 3.8.0
In my case I had set the imageview dimensions to match_parent and specifying it in dp did it for me.
Not sure why exactly match_parent doesn't work in a dialog, playing GIFs, probably something to do with the scaling, if this is the case then using scaleType:fitXY should work too
try this.
Glide.with(context)
.load(imageUrl)
.asGif()
.placeholder(R.drawable.loading2)
.crossFade()
.into(imageView);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With