title: creating gradient stroke using layer-list
body: <p>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.</p>
  
  <p>Here is my code </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;item&gt;
          &lt;shape android:shape="rectangle" &gt;
              &lt;gradient
                  android:angle="270"
                  android:centerColor="#FFFFFFFF"
                  android:endColor="#FFCCCCCC"
                  android:startColor="#FFCCCCCC"
                  android:type="linear" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;item&gt;
          &lt;shape android:shape="rectangle" &gt;
              &lt;solid android:color="#F0F1F3" /&gt;
  
              &lt;margin
                  android:bottom="4dp"
                  android:left="4dp"
                  android:right="4dp"
                  android:top="4dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>The first item is not visible at all. only the second item fills the screen. Any thoughts on how to fix this?</p>