Are you using the draw9patch tool that comes with the sdk? it is quite handy.
Anyway:
It is vital that every pixel except the black ones are completely transparent.
The black pixels should be at the absolute top/bottom/left/right of the image.
The image should be named filename.9.png.