---
title: "android 图片双缓存，开源框架 universali image loader"
author: "Mr.Cheney"
date: "2013-08-14T15:15:18Z"
tags: ["Android", "bitmap"]
categories: ["移动开发"]
slug: "android-universali-image-loader"
draft: false
lastmod: "2013-09-01T13:14:49Z"
id: 1924490
url: "https://mr-cheney.iteye.com/blog/1924490"
---

最近做android的图片双缓存发现了一个开源框架，觉得很好用，在这里记录一下，留着备用。

 

if you want to get a rounded bitmap ,  you can use this: new RoundedBitmapDisplayer(20);

example：

```
ImageLoader imageLoader = ImageLoader.getInstance(); 


DisplayImageOptions  options = new DisplayImageOptions.Builder() 
.showStubImage(R.drawable.ic_stub) 
.showImageForEmptyUri(R.drawable.ic_empty) 
.showImageOnFail(R.drawable.ic_error) 
.cacheInMemory(true) 
.cacheOnDisc(true) 
.displayer(new RoundedBitmapDisplayer(20)) 
.build(); 



imageLoader.displayImage(imageUrls[position], holder.image, options, null); 
```

 

 

[https://github.com/nostra13/Android-Universal-Image-Loader](https://github.com/nostra13/Android-Universal-Image-Loader)