nostra13 / Android-Universal-Image-Loader

Powerful and flexible library for loading, caching and displaying images on Android.
Apache License 2.0
16.78k stars 6.1k forks source link

displayImage not working properly with cached images on system change #947

Open javierpresti opened 9 years ago

javierpresti commented 9 years ago

Hello, I've noticed that displayImage doesn't work well with cache when I add/remove a resource of my app, leaving code unchanged. I've also noticed this behavior when I uploaded my phone to Lollipop. I mean, the update made my app behave incorrectly (displayImage() not working the right way). The problem is that it sometimes shows a different image than the one it should. In order to solve this, I had to clear caches. But because I don't have control over a system update, I have to clear caches every time ImageLoader is inited. Am I doing something wrong? Is this a bug or I am missing something?

Thanks,

javierpresti commented 9 years ago

If I am not clear enough, I can fill in details about this matter. I am not sure if this is a known issue or it is not (I couldn't find a mention to this). Please I am willing to help if this is a bug.

Thank you,

KynoYang commented 9 years ago

+1 got this problem too. When I add some new drawable resources, the drawable ids get changed. I guess it's because imageLoader cached the old drawable of one id.

nostra13 commented 9 years ago

Are you talking about images from app resources (drawable://)?

KynoYang commented 9 years ago

@nostra13 yes

nostra13 commented 9 years ago

Yes, this problem exists. But drawable:// is not recommended (from Readme). Prefer a native way to display drawables.