Open konaire opened 3 years ago
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.
The issue happens still and I think I don't have permissions to change the labels.
Hi! Yes, if you re-load an image by setting a new URL (which seems to happen when your notifyDatasetChanged is called), the image will blink. Can you only reload if there is an actual change in your dataset? The reason why normal images do not blink is that they are still in the cache and there is no animation to reset, so we can immediately fetch again from cache and display. In any case, this is not very performant.
Can you only reload if there is an actual change in your dataset?
Yes, that's what we do usually. The original code in this issue is only an extreme example. We use DiffUtils to determine which item has to be changed and then update only the said item. The issue is that the image doesn't blink if we update a TextView
in an item with a static image (jpg, png) so the user doesn't feel that the image changes. But it's not the case for items with gifs since a gif blinks when the item is updated even if the image stays the same.
Description
GIF images blink when
notifyItemChanged
is called, even non-animated GIFs (1 frame). Non-animated image formats (jpg, png) do not blink. It seems that it happens because I set a controller toSimpleDraweeView
inonBindViewHolder
(see the example below). But from what I understand it's the recommended way to load images. Is there any setting that I could use to disable blinking of GIF images?Reproduction
Kotlin code
```kotlin class MainActivity : AppCompatActivity() { private var adapter: SimpleAdapter? = null override fun onCreate(savedInstanceState: Bundle?) { Fresco.initialize(this) super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) adapter = SimpleAdapter() val recyclerView = findViewByIdLayouts:
activity_main.xml
```xmldrawee_recycler_item.xml
```xmlAdditional Information
fresco:fresco
andfresco:animated-gif
)