I am trying to use layer-list to create a gradient stroke (i.e. perimeter/border) as the background of my view. But it's not working.
Here is my code
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<gradient
android:angle="270"
android:centerColor="#FFFFFFFF"
android:endColor="#FFCCCCCC"
android:startColor="#FFCCCCCC"
android:type="linear" />
</shape>
</item>
<item>
<shape android:shape="rectangle" >
<solid android:color="#F0F1F3" />
<margin
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp" />
</shape>
</item>
</layer-list>
The first item is not visible at all. only the second item fills the screen. Any thoughts on how to fix this?