【发布时间】:2016-02-18 18:20:25
【问题描述】:
我有一个想要显示的照片列表,所以我使用RecyclerView 和RecyclerView.Adapter。所以当我在onBindViewHolder() 中绑定视图时,我会这样做:
// photo is a Object that contains a url
// photoViewHolder.photo is the imageview
Glide.with(photoViewHolder.photo.getContext()) //use the imageview context
.load(photo.getPhotoScaledURL())//load the photo using an url
.into(photoViewHolder.photo); //into the imageview
但在这里我总是依赖 URL。我能以某种方式始终缓存此图像吗?或者有更好的方法吗?
【问题讨论】:
标签: android image-loading android-glide