- Add one pixel width transparent border to your image (png).
- On the top transparent line that we added, paint a black line and it would mark the stretchable zone on the x-axis.
- On the left transparent line that we added, paint a black line and it would mark the stretchable zone on the y-axis.
- On the right and bottom transparent lines that we added, paint a black lines and they would mark the content zone.
- Check that all the pixels that we’ve added around the image are transparent or completely black.
- You should add the markers after you’ve created the images for all dimensions.
More detailed and simple guide: http://radleymarx.com/blog/simple-guide-to-9-patch/
Draw9patch tool seperated from Android Studio: https://github.com/kshoji/draw9patch