Checkout ViewStub discussed here... http://developer.android.com/resources/articles/layout-tricks-stubs.html
On Mar 16, 9:39 pm, eburke <[email protected]> wrote: > Let's say I have some views stacked inside a LinearLayout: > > [LinearLayout vertical] > [ListView weight=1 so it fills the space] > [EditText] > [SomeRowOfButtons] > > I want the "SomeRowOfButtons" to be hidden initially. When the > EditText gets focus I want to animate SomeRowOfButtons in, and when > EditText loses focus, animate SomeRowOfButtons out. > > I've tried translations, ViewSwitchers, etc., but the issue with those > is that it carves out space for the row and never expands the rest of > the parent LinearLayout to fill the space. If there were a way I > could tell the parent to lay out as the animation changes, that might > work. Is there some sort of "animation value changed" listener I > could apply? > > I can set the bottomMargin of SomeRowOfButtons to be negative which > effectively hides it and expands the rest of the UI. However, I can't > figure out how to animate the bottom margin. > > Anyhow, if there's a best practice around this, I'm all ears. I say > that because I've pulled out all my hair trying to solve it, and now > my ears look huge. ;) > > Thanks! -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

