views:

423

answers:

1

How can I create a Slide-Bottom-To-Top animation when close/stop an activity in android application?

A: 

For the animation, use something like

hideWithSlideUp = new TranslateAnimation(0, 0, 0, -displayHeight);

You may have problems if you want the animation to be used on every application stop, including Android killing your app or the user starting a new full-screen Activity.

Dimitar Dimitrov
How do you apply the animation when an activity ends or is paused?
I82Much
If you are following the usual Activity lifecycle, override your Activity's onStop() method, and start the animation before calling super.onStop().Still, this doesn't include extreme cases when your Activity is stopped without your consent like ANR and etc.
Dimitar Dimitrov