安卓背景用shape设置渐变色

Posted 心脏dance

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安卓背景用shape设置渐变色相关的知识,希望对你有一定的参考价值。

startColor:开始的颜色

endColor:结束的颜色

angle:旋转多少度,设置颜色从哪儿个方向开始渐变

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <gradient
        android:angle="270"
        android:startColor="#443B4A80"
        android:endColor="#100E1180" />

</shape>

以上是关于安卓背景用shape设置渐变色的主要内容,如果未能解决你的问题,请参考以下文章