I want an animation while switching from one activity to another in Android. The animation I'm aiming for is a bottom to top like animation.
How can I do that?
Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.
With over a million downloads, Animation Desk is one of the best animation apps for Android that you can try. It has all the things that make an animation app great—a clutter-free user interface, an adequate amount of options, and a handful of ways to export the finished animation.
Yes it is possible. check out this question. You have to define animations in anim folder than you can overide current animation using
overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up );
You can set your animation when you go to another activity using this
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
Also you can get same animation if you come back from last activity to previous activity by overriding method
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With