title: Android tool to generate selector xml for buttons
body: <p>I was wondering if anyone knows of a tool to generate xml selector files for your custom buttons. I'm getting a bit tired creating buttons, convert them to .9.png files and then copying and pasting a custom selector in xml...</p>
  
  <p>I am aware of these tools:</p>
  
  <p><a href="http://www.androidicongenerator.net/" rel="noreferrer">http://www.androidicongenerator.net/</a></p>
  
  <p><a href="http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html" rel="noreferrer">http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html</a></p>
  
  <p>As handy as they are in generating assets/resources, I miss the option to select 4 images and generate a ready-to-use selector xml, which outputs something like:</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;!-- pressed --&gt;
      &lt;item android:state_pressed="true" android:background="@drawable/img_pressed" /&gt;
      &lt;!-- focused --&gt;
      &lt;item android:state_focused="true" android:background="@drawable/img_focussed" /&gt;
      &lt;!-- default --&gt;
      &lt;item android:background="@drawable/img_default" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>I am considering in creating one myself, but can't believe no-one already did it :)</p>
  
  <p>Thanks</p>