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 supplied the
9patch -- XML, style, programmatically -- to setBackground(), it was
drawn in the foreground.

If I did the drawing *myself*, then everything behaved as expected.

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.

It's on my todo list to report this -- together with the other bug
that bit me at the same time -- that if the first drawable resource is
a 9patch, it is loaded as a transparent DrawableColor (!!) No resource
ID conflict or other explanation that I can find. Putting an "a.
9.png", or hand-constructing the NinePatch from a .png, were the
workarounds I could find; I went with the former.

You're going to need an isolated test case to believe me -- I
understand that. Unless you can shoot me full of holes before I spend
the time doing that, which will save me a lot of time... :)

But imagine the frustration trying to debug both issues at the same
time, believing there was only one problem!

On Feb 6, 1:10 pm, Romain Guy <romain...@android.com> wrote:
> Without seeing your code it's hard to know what's going on, but
> background drawables are never drawn in the foreground.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to