shape:定义控件的几何形状,如定义一个圆角的Button,设置渐变色等;当使用shape时,在res/drawable下新建.xml文件选择shape;
二.shape中子元素的属性:
一.shape中的属性:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval":椭圆形状
shape="line":线型
shape="rectangle":矩形
shape="ring">
二.shape中子元素的属性:
1.设置渐变色:gradient
<gradient
android:startColor="#030303":设置开始颜色
android:type="radial":设置渐变放式为放射式
type="linear":平行式渐变
type="sweep":扫描渐变