/** * http://seniorzhai.github.io/2014/10/14/UIL%E5%9B%BE%E7%89%87%E5%BC%82%E6%AD%A5%E5%8A%A0%E8%BD%BD%E5%BA%93%E7%9A%84%E4%BD%BF%E7%94%A8/ * */ private void iniImageLoader() { File cacheDir = StorageUtils.getOwnCacheDirectory(getApplicationContext(),"doubanonlineimageloader/Cache"); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) .memoryCache(new WeakMemoryCache()) .denyCacheImageMultipleSizesInMemory() .offOutOfMemoryHandling() .discCacheExtraOptions(720, 480, CompressFormat.JPEG, 75) .discCache(new UnlimitedDiscCache(cacheDir)) .imageDownloader(new URLConnectionImageDownloader(120 * 1000, 120 * 1000)) .enableLogging() .build(); ImageLoader.getInstance().init(config); imageLoader = ImageLoader.getInstance(); }