首先文档介绍:
<gradient android:angle="integer" android:centerX="integer" android:centerY="integer" android:centerColor="integer" android:endColor="color" android:gradientRadius="integer" android:startColor="color" android:type=["linear" | "radial" | "sweep"] android:useLevel=["true" | "false"] />
<gradient>
shape的颜色渐变属性
attributes:
android:angle
Integer,代表渐变颜色的角度, 0 is left to right, 90 is bottom to top. 必须是45的整数倍.
默认是 0.该属性只有在type=linear情况下起作用,默认的type为linear。
默认情况下,从左到右: