Creating a drawable rectangle in xml with one gradient on the top half and another on the bottom half
<p>I'm trying to create a drawable in xml, a rectangle with one gradient on the top half, and another on the bottom half.  This is NOT the way to do it, apparently:</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:startColor="#5a5a5a88"
                        android:endColor="#14141488"
                        android:angle="270" android:centerX="0.25"/&gt;

        &lt;/shape&gt;
    &lt;/item&gt;
    &lt;item&gt;
        &lt;shape android:shape="rectangle" android:top="80px"&gt;
                &lt;gradient
                        android:startColor="#5aff5a88"
                        android:endColor="#14ff1488"
                        android:angle="270" android:centerX="0.25"/&gt;

        &lt;/shape&gt;
    &lt;/item&gt;
&lt;/layer-list&gt;
</code></pre>

<p>How can I do this, preferably in a way that makes it stretchable to any height?</p>
