public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); File file = this.getCacheDir(); DisplayImageOptions options = new DisplayImageOptions.Builder() .cacheInMemory(true) .cacheOnDisk(true) .build(); ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this) .diskCacheFileCount(100) .defaultDisplayImageOptions(options) .diskCache(new UnlimitedDiscCache(file)) .build(); ImageLoader.getInstance().init(configuration); } }
Imageloader缓存
最新推荐文章于 2019-01-15 19:01:05 发布