android:centerColor=“integer”
android:endColor=“color”
android:gradientRadius=“integer”
android:startColor=“color”
android:type=[“linear” | “radial” | “sweep”]
android:useLevel=[“true” | “false”] />
<padding // 边距属性
android:left=“integer”
android:top=“integer”
android:right=“integer”
android:bottom=“integer” />
<size // 大小属性
android:width=“integer”
android:height=“integer” />
<solid // 填充属性
android:color=“color” />
<stroke // 描边属性
android:width=“integer”
android:color=“color”
android:dashWidth=“integer”
android:dashGap=“integer” />
corners
:用来定义圆角。
<corners // 定义圆角
android:radius=“20dp” // 全部的圆角半径
android:topLeftRadius=“10dp” // 左上角的圆角半径
android:topRightRadius=“10dp” // 右上角的圆角半径
android:bottomLeftRadius=“10dp” // 左下角的圆角半径
android:bottomRightRadius=“10dp” /> // 右下角的圆角半径
solid
:用以指定内部填充色。
// 内部填充色
gradient
:用以定义渐变色,可以定义两色渐变
、三色渐变
及渐变样式
。
<gradient
android:type=[“linear” | “rad