Android nine-patch not being recognized on device Android nine-patch not being recognized on device xml xml

Android nine-patch not being recognized on device


I just had the same issue : everything worked fine in Eclipse but all where streched on the device.I solved it by opening the PNG in the Draw 9-patch tool.Just open the png and save it et voila !


You can find all the necessary information how to create a 9.patch here

Your background should be like this

nine patch background

Note: the markers to the bottom and right need to be drawn as complete lines, not single dots.

Edit
Seems that uploading the 9.patch here becomes altered, and cannot be used as a 9.patch anymore.
You can download the functional version from here


This looks like invalid 9.ptach file to me. There should be solid regions at the bottom and on the right side.