Xml defined shapes do not show up
<p>Recently I've discovered that I can define shapes in an xml file. Until now I was using nine patch images to create custom buttons etc. When I tried with an xml defined shape it didn't worked. None of the shaps, also from stackoverflow which were provided as examples didn't show up. I've seen that someone has already had a similar problem, however eventually it worked on an actual device. Well in my case it didn't.</p>

<p>Here's the navigation_bar.xml I've tried:</p>

<pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt;
&lt;gradient android:startColor="#FFFF0000" android:endColor="#80FF00FF"
        android:angle="270"/&gt;
&lt;padding android:left="7dp" android:top="7dp"
        android:right="7dp" android:bottom="7dp" /&gt;
&lt;corners android:radius="8dp" /&gt;
</code></pre>

<p></p>

<p>and then used in:</p>

<pre><code> &lt;TextView
        android:id="@+id/main_navigation_bar"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"        
        android:background="@drawable/navigation_bar"/&gt;
</code></pre>

<p>The background stays as default/black, nothing is shown.</p>

<p>Am I missing something here? I've also looked at ApiDemos, official documentation and didn't find anything to solve my problem.</p>

<p>Is it better to stay with nine patch images?</p>

<p>Thanks for the replies.   </p>

<p>When tweaking a little with code, I've noticed strange behaviour. My IDE is IntelliJ.</p>

<pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:visible="true"
    android:shape="rectangle"&gt;
&lt;gradient
    android:startColor="#FF89B4EE"
    android:endColor="#FF5791E6"
    android:type="linear"
    android:angle="90"/&gt;
&lt;size
    android:height="fill_parent"
    android:dfv="fill_parent" /&gt;
</code></pre>

<p></p>

<p>I made an intentional typo and code compiled. It looks like shape is being ignored or something. Anyone noticed anything similar?</p>
