Glide4.9.0加载网络图片模糊变形,加载大图

ImageView imageView = (ImageView) holder.mView.findViewById( R.id.iv_pic );
//默认格式RGB_565使用内存是ARGB_8888的一半,但是图片质量就没那么高了,而且不支持透明度。完整代码如下:
Glide.with( mContext )
        .asBitmap()
        .load( pictureList.get( position ).getImgUrl() )
        .dontTransform()//这个方法就是取消图片变化效果
        .format( DecodeFormat.PREFER_ARGB_8888)//设置图片解码格式
        .placeholder( R.mipmap.pic_default )
        .into( imageView );
发布了36 篇原创文章 · 获赞 11 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_34895720/article/details/103798840