@Override
public ILoaderProxy loadImage(View view, File file) {
if (view instanceof ImageView) {
ImageView imageView = (ImageView) view;
//判断缓存中是否已经缓存过该图片,有则直接拿Bitmap,没有则直接调用Glide加载并缓存Bitmap
Bitmap bitmap = LruCacheUtils.getInstance().getBitmapFromMemCache(file);
if (bitmap != null) {
imageView.setImageBitmap(bitmap);
} else {
RequestCreator requestCreator = getPicasso().load(file);
loadOptions(requestCreator).into(imageView);
}
}
return obtain();
}
PicassoLoaderProcessor.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:ImageLoaderProcessor
作者:
评论列表
文章目录