我用imgloader读取网络图片后,缓存图片到sd卡中,但是缓存的图片文件全都没有后缀名,请问这是怎么回事啊?
Application中的配置,
部分代码
//缓存在sd卡中指定目录
File cacheDir = new File(SdCardPath+"/eyunda/img");
ImageLoaderConfiguration imageLoaderConfiguration = new ImageLoaderConfiguration.Builder(
this)
.memoryCacheExtraOptions(200, 200)//设置内存缓存的详细信息
// max width, max height,即保存的每个缓存文件的最大长宽
.discCacheFileNameGenerator(new Md5FileNameGenerator())
// .discCacheExtraOptions(48, 48, null, 0, null)//设置sd卡缓存的详细信息
.threadPoolSize(3)
// 线程池内加载的数量
.threadPriority(Thread.NORM_PRIORITY - 2)
.discCache(new UnlimitedDiscCache(cacheDir))//自定义缓存路径,图片缓存到sd卡
.tasksProcessingOrder(QueueProcessingType.FIFO)
.memoryCache(new LruMemoryCache(4 * 1024 * 1024))
.memoryCacheSizePercentage(10)
.imageDownloader(
new BaseImageDownloader(this, 5 * 1000, 30 * 1000))
// 超时时间 5秒
.imageDecoder(new BaseImageDecoder(true))
.defaultDisplayImageOptions(
DisplayImageOptions.createSimple()) // default
.writeDebugLogs()
.build();// 开始构建
}
![](http://img.bbs.csdn.net/upload/201503/17/1426584664_20914.png)
Application中的配置,
部分代码
//缓存在sd卡中指定目录
File cacheDir = new File(SdCardPath+"/eyunda/img");
ImageLoaderConfiguration imageLoaderConfiguration = new ImageLoaderConfiguration.Builder(
this)
.memoryCacheExtraOptions(200, 200)//设置内存缓存的详细信息
// max width, max height,即保存的每个缓存文件的最大长宽
.discCacheFileNameGenerator(new Md5FileNameGenerator())
// .discCacheExtraOptions(48, 48, null, 0, null)//设置sd卡缓存的详细信息
.threadPoolSize(3)
// 线程池内加载的数量
.threadPriority(Thread.NORM_PRIORITY - 2)
.discCache(new UnlimitedDiscCache(cacheDir))//自定义缓存路径,图片缓存到sd卡
.tasksProcessingOrder(QueueProcessingType.FIFO)
.memoryCache(new LruMemoryCache(4 * 1024 * 1024))
.memoryCacheSizePercentage(10)
.imageDownloader(
new BaseImageDownloader(this, 5 * 1000, 30 * 1000))
// 超时时间 5秒
.imageDecoder(new BaseImageDecoder(true))
.defaultDisplayImageOptions(
DisplayImageOptions.createSimple()) // default
.writeDebugLogs()
.build();// 开始构建
}