<?xml version="1.0" encoding="UTF-8"?>
-<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<!-- android:shape="" 表示是圆角矩形还是椭圆等等 -->
<solid android:color="@color/green"/>
<!-- 背景颜色 -->
<padding android:top="2dp" android:right="2dp" android:left="2dp" android:bottom="2dp"/>
<!-- padding 表示内部空间距离背景图片内部边距 的距离 -->
<stroke android:color="@color/navajowhite" android:width="2dp"/>
<!-- 图片边框属性 -->
<corners android:radius="5dp"/>
<!-- 圆角的程度 -->
<gradient android:type="linear" android:startColor="#9BCD9B" android:endColor="#9BCD9B" android:centerY="0.5" android:centerX="0.5" android:angle="90"/>
<!-- 颜色过度程度 -->
</shape>
转载于:https://www.cnblogs.com/debuggle/archive/2012/09/24/2700008.html