Android ghost solves the problem of activity restart caused by automatic rotation. android ghost

Source: Internet
Author: User

Android ghost solves the problem of activity restart caused by automatic rotation. android ghost

Record that this problem often occurs when a new project is created, just as a group of friends asked this question last time. It means that the activity restarts when the device screen is turned on automatically, which consumes a lot of resources.

For example, when loading the listview data, the system will re-request the data and stop playing the music abnormally. Android does not automatically handle this issue like ios. We need to add this attribute value to manifest ourselves,

Android: configChanges = "orientation | screenSize". You can do this. either of the two values cannot be written incorrectly. For example, I think navgation is

Orientation, the results can be imagined.

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.