Android-activity configuration Changes

Source: Internet
Author: User

android-activity configuration Changes A common configuration change

1 Horizontal Screen Vertical screen conversion


2 Changes in language


3 effective switching of input methods


The important method of two calls
1 @Override
public void onconfigurationchanged (Configuration newconfig)
{
TODO auto-generated Method Stub
Super.onconfigurationchanged (Newconfig);
}


2 manifest files in <activity android:configchanges= "Keyboardhidden | Local ">
Set multiple intermediate plus | symbols


Role of the three configurations

Configuration changes usually restart the current activity


Causes some services to be stopped and can call the Onconfigurationchanged method to customize the configuration so that some services do not stop


For example, horizontal and vertical screen switching does not affect the music player playing music


Four change the type of configuration
Mcc:imsi Mobile device unique coded country change


The change of network code in Mnc:imsi


Locale: Changes in localization


Touchscreen: Set touch screen, never use


Keyboard: Hard keyboard, peripheral keyboard


Keyboardhidden: Keyboard Hide


Navigation: Navigation, 5 buttons, not used


Screenlayout: Screen layout


Fontscale: Font Size


Uimode: The user's mode has changed


Orientation: Screen Orientation


ScreenSize: Screen Size


Smallestscreensize: The physical size of the screen has changed, such as: Connect to an external screen


LayoutDirection: Layout Direction

Android-activity 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.