The Z adjustment only works for window animations. I thought this was documented, but apparently not.
On Thu, Feb 18, 2010 at 8:25 AM, mc_sunw <mlcaun...@googlemail.com> wrote: > 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 android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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