Search code examples
androidlayoutnine-patch

9patch keep seeing the balck lines


I try to make an image strechable with 9patch. But if I make a 9.png image and use it, I see the black lines I drew in 9patch.

9patch problem

How can I prevent this?

enter image description here


Solution

  • If you're creating the 9-patch using a bitmap editor (e.g. like Gimp) then you have to make sure the 1 pixel border surrounding the image is completely transparent except for the black 9-patch markers.