Fresco 圆角边框

https://blog.csdn.net/xiaoqiang_0719/article/details/52437780

 
//圆角图片
RoundingParams rp = new RoundingParams();
//设置边框颜色 宽度
rp.setBorder(Color.RED,2);
//设置圆角
rp.setRoundAsCircle(true);
GenericDraweeHierarchy build = GenericDraweeHierarchyBuilder.newInstance(context.getResources())
       // .setRoundingParams(RoundingParams.asCircle()) //直接设置圆角
        .setRoundingParams(rp)
        .build();
//图片
holder.sdv.setHierarchy(build);

AbstractDraweeController controller = Fresco.newDraweeControllerBuilder()
        //图片地址
        .setUri(split[0])
        //播放gif 图片
   //     .setAutoPlayAnimations(true)
        //点击重新加载时 可以重新加载4 次
        .setTapToRetryEnabled(true)
        .build();
holder.sdv.setController(controller);
//文字
holder.tv.setText(title);


你可能感兴趣的:(Fresco 圆角边框)