title: Android Converting Ninepatch Resource To Bitmap
body: <p>I have a 9 patch drawable as XML. When I try to use <code>BitmapFactory.decode</code> to get bitmap out of it, it returns <code>null</code>. Is there anyway to get a bitmap from this resource?</p>
  
  <p>nine_patch.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
      android:src="@drawable/empty_icon_video" &gt;
  
  &lt;/nine-patch&gt;
  </code></pre>
  
  <p>and the code is:</p>
  
  <pre><code>BitmapFactory.decodeResource(mResources, resId);
  </code></pre>