您的位置:首页 > 移动开发 > Android开发

Android使用shape实现非四角圆角

2017-07-13 10:03 543 查看


如图效果:如果直接设置radius,会是四角都是圆角

<corners android:radius="5dp" />

区别性的设置圆角,需要使用下面的:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="6dp"
android:topLeftRadius="0dp"
android:topRightRadius="6dp" />

<solid android:color="#ffffff" />

</shape>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: