<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!--angle:倾斜角度 0是从左到右
180是从右到左
45是从下到上
270试试从上到下
centerColor:中部颜色
endColor:尾部颜色
startColor:头部颜色
使用时,把控件background属性设置为上面drawable文件-->
<gradient
android:angle="45"
android:centerColor="#FF3333"
android:endColor="#FF0000"
android:startColor="#FF8888"
android:type="linear" />
</shape>
渐变颜色简单使用
最新推荐文章于 2024-05-29 09:12:51 发布