1. An activity switching animation refers to an animation that redirects from an activity to another activity.
It consists of two parts:
Part is the animation when the first activity exits;
In the other part, the animation when the second activity enters;
In Android 2.0 and later versions, we have a function to help us implement this animation. This function is overridependingtransition.
This function has two parameters. One parameter is the animation when the first activity enters, And the other parameter is the animation when the second activity exits.
Here, we need to note that there are two things to consider about the overridependingtransition function.
1. It must be called next to the startactivity () or finish () function"
2. It is applicable only to android2.0 and later versions.
This link helps you understand the method: http://www.oschina.net/question/97118_34343
2However, sometimes the overridependingtransition function does not work. In summary, there are three reasons:
1. for Android 2.0 or lower, there is no way to switch the animation. 2. In embedded activities such as activitygroup, this is easier to solve. Use the following method: This. getparent (). overridependingtransition can be solved. 3. In an internal class of an activity or an anonymous class, handler is used to solve the problem. 4. When the animation effect of the mobile phone is disabled manually or in other ways, you can set it now.-> display the animation effect.