图片圆角的参数

设置图片的圆角

 public static DisplayImageOptions getDisplayImageOptions(){

        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .showImageOnFail(R.mipmap.ic_launcher)  //配置默认图******
                .showImageOnLoading(R.mipmap.ic_launcher)//配置默认图******
                .showImageForEmptyUri(R.mipmap.ic_launcher)//配置默认图******
                .bitmapConfig(Bitmap.Config.ARGB_8888)//配置图片解码格式,图片比较清晰 *****
                .cacheInMemory(true)                    //是否缓存到内存  ******
                .cacheOnDisk(true)                      //是否缓存到sd卡  ******
                .displayer(new RoundedBitmapDisplayer(20))//*******是否设置为圆角,弧度为多少
                .build();
        
        return  options;
    }

需要在调用imageLoader时加

MyAppUtil.getDisplayImageOption()

猜你喜欢

转载自blog.csdn.net/weixin_43815544/article/details/84852329
今日推荐