SmartImageVIew, I would like to force refresh (and

2019-09-02 14:40发布

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条回答
forever°为你锁心
2楼-- · 2019-09-02 15:13

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.

查看更多
登录 后发表回答