Android OnPause Onsavedinstance

Source: Internet
Author: User

Han Mengfei sha Han Yafei [email protected] yue31313 Han_meng_fei_sha

The method at the time of creation of the next activity will not be executed until the execution of this method is completed at the time of the pause.

Do not work long hours in the method of pausing.

The method to store and recover data when the instance state is saved and when the instance state is reset is called only when the activity terminates abnormally. Other conditions will not trigger this.

Screen rotation activity does not re-walk the life cycle, you can configure Android in the manifest file: Configuration change: = "direction | screen Size"

In Android 3.2 (API 13) version above, after setting the activity of the android:configchanges= "Orientation|keyboardhidden", there is no effect, The various lifecycles are still recalled as screen size starts to change with the device's toggle. So, in the Android 3.2 version, if you want to prevent the screen from re-calling each life cycle, you need to add screensize,
Example: android:configchanges= "Orientation|keyboardhidden|screensize"

Android OnPause Onsavedinstance

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.