android drawable自定义xml

1.颜色从上至下的渐变
在这里插入图片描述

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:angle="135"
        android:centerColor="#009688"
        android:endColor="#00695C"
        android:startColor="#4DB6AC"
        android:type="linear" />
</shape>

猜你喜欢

转载自blog.csdn.net/julystroy/article/details/85114307