<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#4CAF50"
android:endColor="#2E7D32"
android:startColor="#81C784"
android:type="linear" />
</shape>
angle --- 渐变色的角度
startColor、centerColor、endColor --- 分别设置3种颜色
type="linear" --- 设置类型为线性渐变