title: using nine-patch image as Background of Button android
body: <p>I have created the following Nine-Patch PNG Image </p>
  
  <p><img src="https://i.stack.imgur.com/IYtSy.png" alt="enter image description here"></p>
  
  <p>but when I add it as a background for a button I have got the following result :</p>
  
  <p><img src="https://i.stack.imgur.com/wKNWa.png" alt="enter image description here"></p>
  
  <p>as you can see the picture not fill all the button Background !</p>
  
  <p>here is the XML Layout File :</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;Button
          android:id="@+id/btn"
          android:layout_width="match_parent"
          android:layout_height="100dp"
          android:background="@drawable/ninepatchimage"
          android:text="Click ME" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>can any one tell me why ??</p>