I use Fresco to load gif in a Recyclerview.
Here is my kotlin code:
fun loadResizeImage(uri: Uri, view: SimpleDraweeView, width: Int, height: Int) {
val request = ImageRequestBuilder.newBuilderWithSource(uri)
.setResizeOptions(ResizeOptions(width, height)).build()
val controller = Fresco.newDraweeControllerBuilder()
.setOldController(view.controller)
.setImageRequest(request)
.build()
view.controller = controller
I don't play the gif, I just load it as a static image. But when I invoke notifydatasetchanged
, the gif blinks.
I have set the supportsChangeAnimations
to false, and only the gif is blinking. Can anyone help me?