Search code examples
androidnine-patch

9 Patch issue? Especially on Galaxy Nexus?


I've a the following .9 image:


Patch 9 example .


As you can see this is a normal .9 baloon. It seems to work flawlessy on android prior to ICS and the draw-9 patch executable tells me everything is fine.

The issue comes when i use this on an ICS device or ICS emulator. It seems it doesn't evaluate the .9 "rules" properly.. In fact i end up getting the bottom-arrow uncentered. Again, draw 9-patch tool shows the bottom-arrow always centered.

Can anyone tell me what is wrong with my .9 image?


Solution

  • Try moving your horizontal content region (bottom 1px) to be centered around the arrow but also including the pixels you are setting to stretch on top. Hard to explain, but i was thinking more like this. image