In the IOS system, we open an app with a boot animation. In this way, when a new form is opened, the user feels that there is a transition animation and the experience is very good, I don't think a form will pop up very suddenly. The following is an example of how to enable and disable an android activity.
Knowledge point:1. You need to configure two animation XML files, one is the start animation and the other is the end animation. 2. Start or close the animation call time.
Knowledge Point 1:You need to add two animation files under anim: activity_open.xml ):
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromYDelta="100%p" android:toYDelta="0"android:duration="1500" /></set>
End animation (activity_close.xml ):
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromYDelta="25" android:toYDelta="100%p" android:duration="1500" /></set>
Knowledge Point 2:Set the startup Animation:
Intent intent = new intent (); intent. setclassname (cxt, "com. test. MRN. android. route. routedemoactivity "); // open an activity cxt. startactivity (intent); cxt. overridependingtransition (R. anim. activity_open, 0 );
Set to close the animation:
@ Overridepublic void finish () {// todo auto-generated method stubsuper. Finish (); // close the form animation to display this. overridependingtransition (R. anim. bottom_end, 0 );}
Additional knowledge points:When the status does not need to appear, you need to set the activity status bar to transparent. In androidmanifest. XML, configure Android: theme = "@ Android: style/theme. translucent"