Android:configchanges issues that are not called

Source: Internet
Author: User

This is also due to issues raised by the SDK version. The version is more rigorous and more restrictive.

"orientation" The screen orientation have changed-the user has rotated the device.

Note: If your application targets API level A or higher ( minSdkVersion targetSdkVersion as declared by the and attributes), then you should also D Eclare "screenSize" the configuration, because it also changes when a device switches between portrait and landscape orientations .

"screenSize" The current available screens size has changed. This represents a-currently available size, relative to the current aspect ratio, so would change when the US ER switches between landscape and portrait. However, if your application targets API level/lower, then your activity all handles this configuration change it Self (This configuration change does not restart your activity, even if running on an Android 3.2 or higher device).

Added in API level 13.

So, to the effect that the SDK version 13 or more, you need to use orientation and screensize. The corresponding screen size changes when the device is switched between the screen and the other. So the correct wording in the activity configuration is

Android:configchanges= "Orientation|screensize"

At the same time, we can know screensize This configuration change does not lead to activity restart.

Android:configchanges issues that are not called

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.