我想创建一个自定义渐变并将其应用于 LinearLayout 的背景。
这是渐变的代码:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#31527B"
android:endColor="#20426F"
android:angle="270"/>
</shape>
我需要一个渐变如下:
不知何故,我没有得到这种效果。我在角度等方面做错了吗/我需要对渐变应用更多属性吗?