Answer the idea: what is it? What's the use? What to pay attention to? What are the classes for the same feature? What are the similarities and differences between these classes?
1. Describe the activity life cycle? What are the two activity jumps that must be performed?
Jump from A to B, there are two cases,
The first B is transparent or dialog-style activity, then a executes onpause,b executes OnCreate OnStart Onresume,
b Press the back key, at which point B executes OnPause onStop ondestory If A is not killed at this point, then Onresume if it is killed, then it will start the life cycle again.
The second type of B is normal activity, then a executes onpause onStop b executes oncreate onStart Onresume
b Press the back key at this point B will execute OnPause onStop ondestory If A is killed, then restart the life cycle, otherwise onrestart OnStart Onresume
2. How to save the contents of EditText before jumping
If the edittext has an ID, then the system will automatically save the change state, if not, you need to save in OnPause
Android face test-four components