I've come across a curious problem:

I have a simple horizontal LinearLayout: Button A - ViewGroup
(vertical LinearLayout containing TextViews) - Button B
It's important to note that the views are defined in the XML in the
above order i.e. Button A, ViewGroup, Button B.

I have a simple TranslateAnimation:
1. Press Button A and the ViewGroup gets animated off the screen to
the right, past Button B.
2. Press Button B and the ViewGroup gets animated off the screen to
the left, past Button A.

In the case of #1, the animation happens with the ViewGroup being
animated *behind* Button B.
In the case of #2, the animation happens with the ViewGroup being
animated *above* Button A.

This happens specifically because Button A was defined before the
ViewGroup in the layout XML.  I've tried changing the Z adjustment for
the animation but this has no effect.

What I want is to have both animations happen behind the buttons (i.e
#2 same as #1).  I don't want to have to re-arrange my layout to have
to define the ViewGroup first and I've tried bringing Button A to the
front but that messes with the overall layout when the ViewGroup is
off the screen, with Button A ending up next to Button B on the right.

Any ideas?  It seems like the Z adjustment isn't doing what it should.

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

Reply via email to