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