Android imageview 如何设置不同角度圆角

2024-10-14 18:18:06

1、实现使用shape写出四个圆角的方法代码

Android imageview 如何设置不同角度圆角

2、实现自定义一个view继承自Imageview对Imageview的样式的方法代码

Android imageview 如何设置不同角度圆角

3、实现绘制圆角imageview的方法代码

Android imageview 如何设置不同角度圆角

4、使用drawRoundRect方法如下

Android imageview 如何设置不同角度圆角

5、通过指定Rect对象以及圆角半径来实现的方法

Android imageview 如何设置不同角度圆角

6、测试的效果如下

Android imageview 如何设置不同角度圆角
猜你喜欢