分割线圆角框:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <!-- width虚线的高度 --> <!-- dashGap底色虚线的宽度 --> <!-- dashWidth底色虚线的宽度 --> <stroke android:dashGap="5dp" android:dashWidth="8dp" android:width="1dp" android:color="@color/red" /> <!--圆角--> <corners android:radius="15dp" /> </shape>
分割线:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line" > <stroke android:dashGap="5dp" android:dashWidth="5dp" android:width="1dp" android:color="@color/red" /> <!-- 虚线的高度 --> <size android:height="1dp" /> </shape>
本文介绍如何使用XML在Android中绘制带有圆角的虚线分割线。通过设置stroke和corners属性来定义虚线的样式和圆角的大小。
1万+

被折叠的 条评论
为什么被折叠?



