安卓SimpleDraweeView通过代码设置圆角

       RoundingParams roundingParams = new RoundingParams();
       roundingParams.setCornersRadius(20);//这里是设置你希望的圆角的值
       GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(getResources());
       GenericDraweeHierarchy hierarchy = builder.build();
       GenericDraweeHierarchy hierarchy.setRoundingParams(roundingParams);
       simpleDraweeView.setHierarchy(hierarchy);//一定要先设置Hierarchy,再去加载图片,否则会加载不出来图片
       simpleDraweeView.setImageURI(“http://ex55-public-test.oss-cn-hongkong.aliyuncs.com/sso/identification/20181214/0185c2de84b24b65abbfc8c35b92ed89.jpeg”);//这里传入你的服务器提供的图片地址

需要注意的是:一定要先设置Hierarchy,再去加载图片

你可能感兴趣的:(图片加载)