Question

I am creating 9 patch images using draw9patch tool and saving images with extension .9.png but when I am using created 9 patch images in app it is giving error. But when I downloaded an 9 patch image from net & used in my same app it is working properly.

I am not getting what I am doing wrong . Please Help

Was it helpful?

Solution

You must be creating the 9-patch wrongly. I had also the same issue . You must be drawing the black patch on one side of image. Try to draw the black patch by dragging your mouse two side of image. I hope you can understand my words...........

OTHER TIPS

Nine-patch images on Android must have transparent 1-pixel edge, and have opaque pixels in left-top border (1 pixel wide) specifying which part of image is stretched, and which do not.

More here: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top