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