版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zsp_android_com/article/details/88424579
虚线
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<!--dashWith 虚线宽-->
<!--dashGap 虚线间空隙宽-->
<!--dashGap=0dp 实线-->
<stroke
android:width="@dimen/px1"
android:color="@color/gray"
android:dashWidth="@dimen/dp_2"
android:dashGap="@dimen/dp_6" />
</shape>
圆环
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false">
<!--useLevel 用LevelListDrawable时true,false时有渐变效果-->
<stroke
android:width="@dimen/dp_6"
android:color="@color/colorPrimary" />
<solid android:color="@color/background" />
<size
android:width="@dimen/dp_20"
android:height="@dimen/dp_20" />
</shape>