[android-developers] Re: Confused about 9-patch files

2009-03-04 Thread Marco Nelissen
Are you sure that b.9.png works correctly? It doesn't seem to stretch correctly either in the draw9patch tool. On Tue, Mar 3, 2009 at 6:36 PM, craiget crai...@gmail.com wrote: Thank you for the replies. Maybe what's causing my confusion is a bug in aapt (or my environment?) rather than

[android-developers] Re: Confused about 9-patch files

2009-03-04 Thread Marco Nelissen
It's a bug in aapt. Where you should normally be able to have up to width/2 horizontal stretch regions, it only allocates enough space for width/4. Your image was 36 pixels wide, so you can have 9, and it would crash on 10 (like your c.9.png image). The issue with draw9patch you mentioned earlier

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread deepdr...@googlemail.com
You can find examples of 9patch files in the SDK, in tools/lib/res/ default/drawable/ The .9.png files are 9patches. http://www.deepdroid.com On Mar 3, 3:26 am, craiget crai...@gmail.com wrote: Can someone please explain or provide examples (links) of some valid 9- patch files? From

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread Marco Nelissen
On Mon, Mar 2, 2009 at 6:26 PM, craiget crai...@gmail.com wrote: Can someone please explain or provide examples (links) of some valid 9- patch files? From reading the API description, I think my understanding is flawed. As an example, there's a 9-patch located at:

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread Romain Guy
Because a ninepatch consists of 9 patches, only 5 of which are scaled, while the 4 corners are not scaled. An image that has a black top-left pixel therefore cannot be a ninepatch image. The draw9patch tool shouldn't even let you set the top-left to black. Actually our 9patches really are

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread Dianne Hackborn
A feature unfortunately added after the name itself was pretty set in stone. :) On Tue, Mar 3, 2009 at 12:55 PM, Romain Guy romain...@google.com wrote: Because a ninepatch consists of 9 patches, only 5 of which are scaled, while the 4 corners are not scaled. An image that has a black

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread craiget
Thank you for the replies. Maybe what's causing my confusion is a bug in aapt (or my environment?) rather than misunderstanding the concept of 9-patch. In which case I may be posting to the wrong place. I've got two files that demonstrate what's happening: This first file, Eclipse likes and it

[android-developers] Re: Confused about 9-patch files

2009-03-03 Thread Dianne Hackborn
aapt should never crash, so it's a bug in it of some kind. Unless you want to dig in and figure out the problem, filing a bug report would probably be good. :) On Tue, Mar 3, 2009 at 6:36 PM, craiget crai...@gmail.com wrote: Thank you for the replies. Maybe what's causing my confusion is a