Before you begin, Let’s talk about Android lifecycle first . Learn about Android’s four major components,And to be familiar with Android development tool -Android Studio.
Activity
1 2 3 4
Activity1->Activity2: onCreate()——>onStart()——>onResume() Note left of Activity2: 第一个 Pause,第二个Create,Start,Resume。第一个 Stop Activity2-->Activity1: back to the activity1 Note left of Activity2: 暂停,restart第一个,start,resume,第二个stop,destory.
when you push a new Activity or back Activity, it’s due to the stack to manage the Activity status, but how to push a new Activity?
1 2 3 4 5
Intent intent = new Intent(ReorderFour.this, ReorderTwo.class);