使用ImageLoader缓存网络图片问题

我用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();// 开始构建
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值