我正在使用https://source.unsplash.com/daily?nature的幻灯片将图像加载到我的应用程序
它是一个免费使用图像平台,上面的链接每天更新图像。
然而,幻灯片显示的是旧缓存的图像,即使图像已经更新在网站上。
所用代码:
Glide.with(this)
.load("https://source.unsplash.com/daily?nature")
.into(imageView);幻灯片版本: 4.0.0
发布于 2018-02-12 04:25:54
如果您的URL和catch在glid中是正确的,那么它将从catch加载图像,并且您选择了第一天,而且我知道您只想从一个URL加载图像
溶液
只需先做一件事,如果你的图像加载在一天内第一次调用,然后捕捉内存,然后在加载你的图像之后,设置一个条件。
if(isTHisyourFirstDay){
Glide.get(getApplicationContext()).clearMemory();
}
Glide.with(this)
.load("https://source.unsplash.com/daily?nature")
.into(imageView);https://stackoverflow.com/questions/48739425
复制相似问题