一分钟解决Shape分割线及分割线圆角框

分割线圆角框:

<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>

猜你喜欢

转载自blog.csdn.net/Android_hv/article/details/78803673