- 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");