It can be a bit confusing but I guess if you've got the time you should always read as much as you can on each topic.
The easy steps are:
- Just open your favorite png editor (GIMP?) and create the background for your button.
This only takes 30 seconds in your favorite graphics editor.
Raw button - It is at this point where you need to open the "draw9patch" tool you can find in your "android-sdk/tools" folder.
Using this tool you open the file you just created.
You see I've already marked the areas I want the button to repeat. It will tell Android that which parts of the image it should tile/repeat when re/sizing the background to fit buttons of different sizes.
draw9patch tool
It also shows you the preview in the right side. - Now to save your image. Point the draw9patch to your "res/drawable" folder and give the image a name. Let's call it "green_button_style.png". After save, you'll notice the tool has actually created a file named "green_button_style.9.png". Don't let the additional "9" fool you. When using the resource identifier, it will be left out.
- Now you'll want to point the background of your buttons to this graphic. Open your layout's xml and find the button you want to style. Add the background attribute (android:background) and use the identifier for your new image which is "drawable/green_button_style" (as I said, you leave the "9" part out).




