Nine-Patch Drawable vs Shape Drawable. Which should be preferred?
<p>My co-worker and I developed two apps in parallel, each with similar styling.  The main view background of these apps is a radial gradient.  He implemented his as a nine-patch image and I did it with a shape drawable.  Both generate similar and acceptable results.</p>

<p>So my question is, which should we use?  Are there are trade-offs between memory consumption and performance?  I imagine that the image could take time to load, but that the shape drawable takes more time to draw (due to calculations).  Are these then stored in a cache and those penalties only happen the first time they are displayed or are these issues on-going???</p>

<p>Shape Drawable:</p>

<pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt;
    &lt;gradient
        android:startColor="#003472"
        android:endColor="#000034"
        android:gradientRadius="350"
        android:type="radial"/&gt;
&lt;/shape&gt;
</code></pre>

<p>Nine Patch:</p>

<p><img src="http://i.stack.imgur.com/Mt65K.png" alt="enter image description here"></p>
