1.实心长方形
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 设置固定填充色 -->
<solid android:color="#f00" />
<size android:width="60dp" android:height="30dp"/>
</shape>
2.长方形外框
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="60dp" android:height="30dp"/>
<!-- 设置描边 -->
<stroke android:width="2dp" android:color="#f00" ></stroke>
</shape>
3.虚线长方形外框
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="60dp" android:height="30dp"/>
<!-- 设置描边 -->
<stroke android:width="2dp" android:color="#f00" android:dashWidth="5dp" android:dashGap="5dp"></stroke>
</shape>
4.虚线椭圆形
<size android:width="60dp" android:height="30dp"/>
<!-- 设置描边 -->
<stroke android:width="2dp" android:color="#f00" android:dashWidth="5dp" android:dashGap="5dp"></stroke>
<corners android:radius="15dp"/>
</shape>
5.实心椭圆形
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 设置固定填充色 -->
<solid android:color="#f00" />
<size android:width="60dp" android:height="30dp"/>
<corners android:radius="10dp"/>
</shape>
6.椭圆形外框
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="60dp" android:height="30dp"/>
<!-- 设置描边 -->
<stroke android:width="2dp" android:color="#f00" ></stroke>
<corners android:radius="15dp"/>
</shape>
7.圆形
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="20dp"
android:shape="ring"
android:thickness="2dp"
android:useLevel="false" >
<!-- 设置固定填充色 -->
<solid android:color="#f00" />
<size
android:height="44dp"
/>
8.直线
<stroke android:width="1dp" android:color="#f00"/>
<size android:height="10dp"></size>
</shape>
9.虚线
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<stroke
android:dashGap="8px"
android:dashWidth="8px"
android:width="1dp"
android:color="#f00" />
<size android:height="30dip" />
</shape>