[android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Mark Nuetzmann
After a quick search I saw some comments of what not to do... but in my case it WORKED PERFECT. Rather than setting the layout background in the xml as I had originally done (and what I would have preferred to do). I took a little of the code from another post and set the background in code.

[android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Bob Kerns
The right thing to do is to adjust your 9patch with the 9patch tool to indicate what the padding should be. Those are those pixels on the right and bottom. I haven't actually tried setting them to be wider than the stretchable area, but I'd expect it to work. But the other issue I've found is

Re: [android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Romain Guy
Without seeing your code it's hard to know what's going on, but background drawables are never drawn in the foreground. On Sat, Feb 6, 2010 at 11:39 AM, Bob Kerns r...@acm.org wrote: The right thing to do is to adjust your 9patch with the 9patch tool to indicate what the padding should be.

[android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Bob Kerns
That is what I firmly believed -- until extensive testing convinced me otherwise: that NinePatchDrawable's are, unlike everything else, drawn in the foreground. I recognize it's an extraordinary claim, requiring extraordinary evidence. However -- my testing indicated that, no matter HOW I

Re: [android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Romain Guy
I can assure you that NinePatchDrawables are NOT drawn in the foreground. The only reason I can see this hasn't provoked an uproar (besides possible hallucinations on my part, which I haven't quite ruled out), is that the advice is to leave the center center tile transparent. There is

[android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Bob Kerns
I can assure you that's what I believed, expected, and still want to believe! And yet, supplying, at the same line of code, to the exact same view, an BitmapDrawable vs a NinePatchDrawable, produced dramatically different results. You'll have to see a demo app to believe it. Hopefully, I'll just

[android-developers] Re: Background on layout is scrunching contained content

2010-02-06 Thread Bob Kerns
gah, meant to reply to this part, too: Please refer to the documentation: http://developer.android.com/intl/de/reference/android/graphics/NinePatch.html Normally, the middle is transparent so that the patch can provide a selection about a rectangle. As you can see, I didn't make it up.