Android settings animation when activity starts and exits

Source: Internet
Author: User
Business development encountered a small stunt, required to achieve activity startup from the bottom up, exit when exiting from the top down. The animation of other activity at startup and exit is not a concern here, There are two ways to implement this: 1. Code, through the activity of the Overridependingtransition interface, that is, when StartActivity called Overridependingtransition (r.anim.push_ bottom_in, 0) at finish, call Overridependingtransition (0, R.anim.push_bottom_out) 2. Configure the style as follows:1> in res/values/ defined in Styles.xml style:activityinoutanimation2> defined in Res/values/themes.xml theme.batchmanageactivity3> Set the theme for the target activity, as shown in the following example: more reusable than the scenario 1,xml configuration, separation of business and UI, ease of maintenance, recommended scenario 2. Attach stunt animations: push_bottom_in.xmlpush_bottom_out.xml Category: Android, Java

Android settings animation when activity starts and exits

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.