//原图显示
options1 = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.ic_stub)
.showImageForEmptyUri(R.mipmap.ic_launcher)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisc(true)
.bitmapConfig(Bitmap.Config.ARGB_8888) //设置图片的解码类型
.build();
//圆角图片
options2 = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.ic_stub)
.showImageForEmptyUri(R.mipmap.ic_launcher)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisc(true)
.bitmapConfig(Bitmap.Config.ARGB_8888) //设置图片的解码类型
.displayer(new RoundedBitmapDisplayer(20))
.build();
//圆形图片
options3 = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.ic_stub)
.showImageForEmptyUri(R.mipmap.ic_launcher)
.showImageOnFail(R.drawable.ic_error)
.cacheInMemory(true)
.cacheOnDisc(true)
.bitmapConfig(Bitmap.Config.ARGB_8888) //设置图片的解码类型
.displayer(new Displayer(0))
.build();
imageloader 设置
最新推荐文章于 2019-01-14 08:04:29 发布