I am trying to create a nine patch drawable. I created an image with a white border and then opened it in Draw9patch software as explained here:
- http://developer.android.com/tools/help/draw9patch.html
- http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
I don’t understand what I am supposed to do. I drew some kind of black border around it, and it gives me errors when I try to us it in my app. I have tried to draw a red border around it and it also gives the same errors that the nine patch is not valid.
Sometimes the area of the nine patch shows in pink and sometimes in green. I don’t understand what it means and nothing is explained anywhere.
- If the nine patch is not valid how can I know (before compiling the
app of course!)? - Do you know of any good tutorial for nine patch, explaining more then only how to open nine patch software?
There is nothing complicated in 9Patch image let me explain you via example(image)

TopandLeftparts are stretchable area, this part will increase when your screen size increaseYou can see pink dotted box in the 1st part of image that show
thispart will resize.BottomandRightparts are for content padding, your content will reside in this part only(reserve your content area).You can see pink dotted box in the 2st part of image that show
thispart is for your content(string or etc).General standard to be follow given in below image.
Note: make 9patch of those image which having uniform color and shape(not complex curve).