I'm trying to make a drawable which should look like in the image below:
3 horizontal lines of 1dp
, each with a different color, and the rest of the space should be filled with a gradient:
So I wrote this:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="line">
<stroke android:width="1dp" android:color="#c80047"/>
</shape>
</item>
<item android:top="1dp">
<shape android:shape="line" >
<stroke android:width="1dp" android:color="#5ec800"/>
</shape>
</item>
<item android:top="2dp">
<shape android:shape="line" >
<stroke android:width="1dp" android:color="#ffffff"/>
</shape>
</item>
<item android:left="0dp" android:right="0dp" android:top="3dp">
<shape android:shape="rectangle">
<gradient android:angle="-90" android:startColor="#3B3B3B"
android:endColor="#000000" />
</shape>
</item>
</layer-list>
The gradient is correctly drawn but the 3 line stay black. I have tried to add <stroke android:color="a_color" />
without result.
What am I missing ?