title: Applying 9-patch png on android
body: <p>I'm using 9-patch images to create selector for buttons that can be stretched in different screen size. So I basically pass the name of the files (without the .9.png) in the selector like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item android:state_pressed="true" android:drawable="@drawable/img_common_white_button_bg_pressed" /&gt;
      &lt;item android:drawable="@drawable/img_common_white_button_bg_default" /&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p>And I thought this should be okay. The graphical layout screen of the xml doesn't show any problem with the button, but when I run the app in my device, this is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/34kwx.png" alt="enter image description here"></p>
  
  <p>So I'm not sure whether I applied the images the wrong way or is it the problem of the 9-patch files? I'll really appreciate it if someone could enlighten me with this. Thank you.</p>