I'm attempting to create customs buttons using icons instead of text, and this requires the background property of each button view to utilise a nine patch image, where everything bar the icon can be scaled.
When I select my nine patch image, the WYSIWYG editor displays it as it should (http://i.imgur.com/rXYWQnf.png) but when compiled to either the emulator or a device, the image is scaled like a normal .png but with the nine patch lines visible (http://i.imgur.com/duwKJ10.png)
I have performed multiple clean & rebuilds, as well as moving the swinglabs jar into the lib folder of the tools directory, but still it doesn't seem to work. I'd be happy to provide any other information you may need to answer this question, the things become the bane of this app!
My images were created through the draw9patch tool and saved with the .9.png postfix via the tool
Thanks Guys! It was my mistake in not quite understanding the nine patch scale/fill relationships in the top/left and bottom/right 1px lines, thanks again! - Ciaren Coleman
您的九个补丁中缺少顶线,这就是问题所在,顶部应该有一些像素来告诉您像您在左侧所做的那样拉伸什么。没有顶部和左侧线九个补丁是不完整的。