SmartImageVIew, I would like to force refresh (and not caching)

不羁的心 提交于 2019-12-25 02:54:07

问题


I am using this useful class that allow smart online downloading of images (from the loopj guys). It works fine, but i cannot force the "refresh" in the case of same name images that could have been changed in the server (example: I update my profile picture). So at the moment I am forcing the brutal delete of my app cache dir before the setImageUrl(). It works, and some FileNotFoundException is raised. No big deal, but I hate having something that works "without really working", I don't know if you know what I mean :) Lots of thanks, again


回答1:


Have a look at my answer to a similar question here

It essentially involves appending a paramater to the end of the url you use to fetch the image and ensuring that the parameter is unique each time you call it thus forcing a fresh call.



来源:https://stackoverflow.com/questions/29194496/smartimageview-i-would-like-to-force-refresh-and-not-caching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!