7, the Step 5 of the android:configchanges= "orientation" changed to Android:configchanges= "Orientation|keyboardhidden", perform step 3 and print only
Onconfigchanged
Onconfigurationchanged-->
1. When the android:configchanges of the activity is not set, the screen will recall each lifecycle.
The horizontal screen is executed once, and the vertical screen is executed twice
2, set the activity of the android:configchanges= "orientation", the cut screen will be adjusted again
With each life cycle, the horizontal, vertical screen will only be executed once
3, set the activity of the android:configchanges= "Orientation|keyboardhidden",
The cut screen does not recall each lifecycle, only the Onconfigurationchanged method is executed
summarize the life cycle of the entire activity Add that the current activity generates events that pop up toast and alertdialog when the life of the event
There's no change in the cycle
The activity runs by pressing the home key (same as being completely covered): Onsaveinstancestate-->
OnPause--> onStop onrestart-->onstart--->onresume
Activity not completely covered just lost focus: OnPause--->onresume
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.