1、圆形shape
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
//形状
android:shape="oval">
//填充颜色
<solid android:color="@color/white"/>
//大小
<size android:width="50dp"
android:height="50dp"/>
</shape>
2、圆角矩形
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 实心 -->
<solid android:color="@android:color/white" />
<!-- 边框 -->
<stroke
android:width="0.5dp"
android:color="@color/dominate_green" />
<!-- 圆角 -->
<corners android:radius="3dp" />
<!-- 边距 -->
<padding
android:bottom="3dp"
android:left="3dp"
android:right="3dp"
android:top="3dp" />
<!-- 渐变 -->
<gradient
android:angle="270"
android:endColor="@color/color_13AE67"
android:startColor="@color/color_13AE67" />
</shape>
3、画line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke android:dashGap="8dp"
android:width="2dp"
android:dashWidth="10dp"
android:color="@color/color_13AE67"
/>
<size android:width="1dp"/>
</shape>