- init The SimpleImageLoader with ImageLoaderConfig
private void initImageLoader() {
ImageLoaderConfig config = new ImageLoaderConfig()
.setLoadingPlaceholder(R.drawable.loading)
.setNotFoundPlaceholder(R.drawable.not_found)
.setCache(new DoubleCache(this))
.setThreadCount(4)
.setLoadPolicy(new ReversePolicy());
// 初始化
SimpleImageLoader.getInstance().init(config);
}
- call the displayImage to load bitmap.
SimpleImageLoader.getInstance().displayImage(myImageView, "http://www.xxx/myimage.jpg");
March 28, 2018 1:43 PM 将工程代码结构修改成Android studio的结构。
- 缓存策略
- 本地缓存DisLruCache基本用法
- 策略模式
- 链式调用