首页
IT
登录
6mi
u
盘
搜
搜 索
IT
缓存到SD卡
缓存到SD卡
xiaoxiao
2021-03-25
132
//设置下载的图片是否缓存在内存中
// cacheInMemory()
//设置下载的图片是否缓存在SD卡中
// cacheOnDisc()
DisplayImageOptions options
=
new
DisplayImageOptions.Builder
().
cacheInMemory
(
true
).
cacheOnDisk
(
true
).
build
();
ImageLoader
.
getInstance
().
displayImage
(
image_list
.
get
(
0
).
getUrl
(),
holder
.
imageview
,
options
);
public void
onClick
() {
ImageLoader imageLoader
=
ImageLoader
.
getInstance
();
//清除SD卡缓存;
imageLoader
.
clearDiskCache
();
//清除本地缓存;
imageLoader
.
clearMemoryCache
(); }
转载请注明原文地址: https://ju.6miu.com/read-19254.html
技术
最新回复
(
0
)