AndroidManifest.xml补充之:andorid:configChanges
来源:互联网 发布:linux shell脚本入门 编辑:程序博客网 时间:2024/06/15 04:20
FROM:http://blog.csdn.net/shift_wwx/article/details/19488771
Android:configChanges
Lists configuration changes that the activity will handle itself. When a configurationchange occurs at runtime, the activity is shut down and restarted by default, but declaring aconfiguration with this attribute will prevent the activity from being restarted. Instead, the activity remains running and its
onConfigurationChanged()
method is called.
Note: Using this attribute should be avoided and used only as a last resort. Please read Handling Runtime Changes for more information about how to properly handle a restart due to a configuration change.
Any or all of the following strings are valid values for this attribute. Multiple values are separated by '|
' — for example, "locale|navigation|orientation
".
通过上面介绍获悉:
当配置list中有发生修改时,activity会自动的结束并重启,但是不会从onCreate 和 onRestart,而是从onConfigurationChanged()开始。
list中的配置是用符号“|”来分隔。
mmc:The IMSI mobile country code (MCC) has changed — a SIM has been detected and updated the MCC.
移动国家号码,由三位数字组成,每个国家都有自己独立的MCC,可以识别手机用户所属国家。
mnc :The IMSI mobile network code (MNC) has changed — a SIM has been detected and updated the MNC.
移动网号,在一个国家或者地区中,用于区分手机用户的服务商。
local:The locale has changed — the user has selected a new language that text should be displayed in.
选择了另一种语言
touchscreen :The touchscreen has changed. (This should never normally happen.)
keyboard :The keyboard type has changed — for example, the user has plugged in an external keyboard.
键盘模式发生变化,例如:用户接入外部键盘输入。
keyboardHidden :The keyboard accessibility has changed — for example, the user has revealed the hardware keyboard.
用户打开手机硬件键盘。
navigation :The navigation type (trackball/dpad) has changed. (This should never normally happen.)
screenLayout :The screen layout has changed — this might be caused by a different display being activated.
fontScale :The font scaling factor has changed — the user has selected a new global font size.
uiMode :The user interface mode has changed — this can be caused when the user places thedevice into a desk/car dock or when the night mode changes. SeeUiModeManager
. Added in API level 8.
orientation :The screen orientation has changed — the user has rotated the device.
Note: If your application targets API level 13 or higher (asdeclared by theminSdkVersion
and targetSdkVersion
attributes), then you should also declare the"screenSize"
configuration, because it also changes when a device switches between portrait and land scape orientations.
设备旋转,横向显示和竖向显示模式切换。note中显示API level大于13的话要申明screenSize属性
screenSize :The current available screen size has changed. This represents a change in the currently available size, relative to the current aspect ratio, so will change when the user switches between landscape and portrait. However, if your application targets API level 12 or lower, then your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an Android 3.2 or higher device).
Added in API level 13.
有效的显示区域发生变化
smallestScreenSize :The physical screen size has changed. This represents a change in size regardless oforientation, so will only change when the actual physical screen size has changed such as switching to an external display. A change to this configuration corresponds to a change in the smallestWidth configuration. However, if your application targets API level 12 or lower, thenyour activity always handles this configuration change itself (this configuration change does notrestart your activity, even when running on an Android 3.2 or higher device).
Added in API level 13.
屏幕的物理尺寸发生变化,例如切换到一个外接的显示设备layoutDirection
:The layout direction has changed. For example, changing from left-to-right (LTR) to right-to-left (RTL).Added in API level 17.
- AndroidManifest.xml补充之:andorid:configChanges
- AndroidManifest.xml补充之:andorid:configChanges
- AndroidManifest.xml之android:configChanges 属性
- AndroidManifest 之 android:configChanges
- AndroidManifest.xml中android:configChanges
- Android - AndroidManifest.xml - android:configChanges
- AndroidManifest.xml中 andorid 版本号
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges属性
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- AndroidManifest.xml中android:configChanges的简介
- 在Spring Boot框架下使用WebSocket实现聊天功能
- 八款实用软件
- MySQL(1):安装、首次使用
- 数据库(一)-- 常用查询语句
- hadoop笔记本
- AndroidManifest.xml补充之:andorid:configChanges
- OpenCV控制摄像头实现 拍照功能
- android repo中manifest.xml的详解
- Vue.js开发环境搭建
- java随便写写
- canvas编写同心圆
- 超级素数
- 写简历有疑惑?戳进来找答案!
- Android之屏幕适配