问题
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:
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?
Thanks.
Regards.
V.
回答1:
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.
来源:https://stackoverflow.com/questions/10006633/android-9-patch