Coil: Refresh picture flicker

Created on 1 Sep 2019  ·  4Comments  ·  Source: coil-kt/coil

memoryCachePolicy(CachePolicy.DISABLED) after loading the same picture will cause flicker, glide has dontAnimate() can solve, the coil?

bug

Most helpful comment

@isMeiying memoryCachePolicy(CachePolicy.DISABLED) will disable reading and writing to the memory cache. This will force Coil to load the image from disk, which can often take more than 16ms, which can cause the flickering.

The equivalent of Glide's dontAnimate() is crossfade(false) (and don't set memoryCachePolicy). Let me know if that solves your issue.

All 4 comments

I've noticed the same flicker in ImageViews even when loading images from the cache.

即使从缓存中加载图像,我也注意到了ImageViews中的闪烁效果。

Me too! but i set crossfade(false) to temporarily solve this problem.

@colinrtwhite When setting the same picture, I hope he won't change anything.

@isMeiying memoryCachePolicy(CachePolicy.DISABLED) will disable reading and writing to the memory cache. This will force Coil to load the image from disk, which can often take more than 16ms, which can cause the flickering.

The equivalent of Glide's dontAnimate() is crossfade(false) (and don't set memoryCachePolicy). Let me know if that solves your issue.

@isMeiying memoryCachePolicy(CachePolicy.DISABLED) will disable reading and writing to the memory cache. This will force Coil to load the image from disk, which can often take more than 16ms, which can cause the flickering.

The equivalent of Glide's dontAnimate() is crossfade(false) (and don't set memoryCachePolicy). Let me know if that solves your issue.

Thank you very much, it solved my problem!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Starscream9559 picture Starscream9559  ·  7Comments

ianhanniballake picture ianhanniballake  ·  3Comments

RubenGonzalezGonzalez picture RubenGonzalezGonzalez  ·  6Comments

mario picture mario  ·  3Comments

wooldridgetm picture wooldridgetm  ·  3Comments