I’ve got a layout much like the one below. Currently when the back button is pressed the red linear layout’s visibility is set to gone. However, I’d like it to “slide” up off of the page instead. How would I do this?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use animations. here is the top in/out animations:
In Top
Out Top
Then in your activity get the view and apply an animation to it like this:
This are type Animation.
and call them with this code:
Here header is a LinearLayout wrapping my views. same thing if you want to make it slide in. just add the slide in animation and make the view visible.