Overview of overridependingtransition

Source: Internet
Author: User

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.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.