Search code examples
androidnine-patch

How to create nine-patch and use it in my App?


I want to create a nine-patch image and use that in my App but I don't know how to create it?

I've searched through the Android source code on the Web and I can't seem to find any examples of this. I need a tutorial so that I can understand the process.


Solution

  • There's a tool included in the android sdk to create and test nine patch images: http://developer.android.com/guide/developing/tools/draw9patch.html

    You can also create a nine patch file using every gfx package out there ( photoshop, paint.net, ... ) using the creation guideline here: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch