Question

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...

I am aware of these tools:

http://www.androidicongenerator.net/

http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html

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:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- pressed -->
    <item android:state_pressed="true" android:background="@drawable/img_pressed" />
    <!-- focused -->
    <item android:state_focused="true" android:background="@drawable/img_focussed" />
    <!-- default -->
    <item android:background="@drawable/img_default" />
</selector>

I am considering in creating one myself, but can't believe no-one already did it :)

Thanks

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top