Android Runtime configuration changes

Source: Internet
Author: User

Android supports the ability to change languages at run time, location, hardware, and it is done by terminating and restarting activity to implement the appeal function. The resolution of the resources used in the activity can be forced to be re-evaluated and the most appropriate resource value is selected for the experience configuration.

To allow activity to listen for runtime configuration changes, you need to add a Android:configchanges property to its manifest node to specify which configuration changes you want to handle

The following list describes the run-time changes that you can specify:

MCC and MNC detect SIM and the code for the country or network associated with it has changed

Locale user changes the device's language settings

Keyboardhidden Shows or hides the keyboard, d-pad, or other input mechanisms

Keyborad changed the type of keyboard.

Fontscale user modified the preferred font size

Uimode The overall UI pattern has changed. such as car mode, daytime or night mode

The orientation screen rotates between portrait and landscape (Note: This property resolves the issue of activity re-creation after screen rotation when making a video player)

Screenlayout screen layout has changed, such as activating another screen,

ScreenSize when the available screen size changes, such as when changing between landscape and portrait

Smallestscreensize when the physical screen size changes, such as linking to an external display

Android Runtime configuration changes

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.