<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:angle="90" android:startColor="#00ff00ff" android:endColor="#ffff00ff" /> </shape>
- angle 表示设置渐变角度,分别为0、90、180 、360度
- startColor 表示开始颜色
- endColor 表示结束颜色