DisplayImageOptions imageOptions = new DisplayImageOptions.Builder()
.cacheOnDisk(true).cacheInMemory(true)
.showImageOnLoading(R.drawable.ic_launcher)
.showImageOnFail(R.drawable.ic_launcher).build();
int max = (int) (Runtime.getRuntime().maxMemory() / 8);
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(
getApplicationContext())
.discCache(new UnlimitedDiskCache(getCacheDir()))
.memoryCache(new UsingFreqLimitedMemoryCache(max))
.threadPoolSize(3).threadPriority(Thread.NORM_PRIORITY - 1)
.defaultDisplayImageOptions(imageOptions).build();
ImageLoader.getInstance().init(configuration);
09-03