Android - 9 patch

Go To


I'm trying to create a new spinner background using a 9 patch picture. I've tried many ways to get a perfect image but I failed :s

Here is my 9 patch: enter image description here

The content looks to be good when I simulate with Draw-9-patch but the part with the arrow is not displayed, or when it is, this part is totally mal-formed.

I've put the top black line to the whole size and the problem is still the same.

Do you know how to solve it?




2012-04-04 07:24
by Manitoba
the border lines looks strange. I mean they shouldn't cover the rounding corners, at least - waqaslam 2012-04-04 07:34


First of all, you've marked your rounded corners as stretchable, this should be avoided so your corners stay the same, no matter how its stretched. You've also marked your arrow as being stretchable vertically, which I suppose is not desirable.

See the attached image for a fixed 9-patch (note the differences in 9-patch frame compared to your image), this should scale well in all directions.9-patch dropdown

2012-04-04 07:34
by Sveinung Kval Bakken
Thanks that works - Manitoba 2012-04-04 07:44
You just helped me a lot! Thanks - M2X 2012-04-14 17:16