亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 870 | 回復(fù): 0
打印 上一主題 下一主題

android ConfigChanges [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2011-12-21 08:41 |只看該作者 |倒序?yàn)g覽

Activity中ConfigChanges屬性的用法

 通過設(shè)置這個屬性可以使Activity捕捉設(shè)備狀態(tài)變化,以下是可以被識別的內(nèi)容:  
CONFIG_FONT_SCALE
CONFIG_MCC
CONFIG_MNC
CONFIG_LOCALE
CONFIG_TOUCHSCREEN
CONFIG_KEYBOARD
CONFIG_NAVIGATION
CONFIG_ORIENTATION

設(shè)置方法:將下列字段用“|”符號分隔開,例如:“locale|navigation|orientation

Value Description
mcc The IMSI mobile country code (MCC) has changed — that is, a SIM hasbeen detected and updated the MCC.移動國家號碼,由三位數(shù)字組成,每個國家都有自己獨(dú)立的MCC,可以識別手機(jī)用戶所屬國家。
mnc The IMSI mobile network code (MNC) has changed — that is, a SIM hasbeen detected and updated the MNC.移動網(wǎng)號,在一個國家或者地區(qū)中,用于區(qū)分手機(jī)用戶的服務(wù)商。
locale The locale has changed — for example, the user has selected a new language that text should be displayed in.用戶所在地區(qū)發(fā)生變化。
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.鍵盤模式發(fā)生變化,例如:用戶接入外部鍵盤輸入。
keyboardHidden The keyboard accessibility has changed — for example, the user has slid the keyboard out to expose it.用戶打開手機(jī)硬件鍵盤
navigation The navigation type has changed. (This should never normally happen.)
orientation The screen orientation has changed — that is, the user has rotated the device.設(shè)備旋轉(zhuǎn),橫向顯示和豎向顯示模式切換。
fontScale The font scaling factor has changed — that is, the user has selected a new global font size.全局字體大小縮放發(fā)生改變
通過一個例子介紹這個屬性的用法: 首先需要修改項(xiàng)目的manifest:
?View Code XML
<manifest xmlns:android="http://schemas.android.com/
      package="com.androidres.ConfigChangedTesting"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".ConfigChangedTesting"
                  android:label="@string/app_name"
                  android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

在Activity中添加了 android:configChanges屬性,目的是當(dāng)所指定屬性(Configuration Changes)發(fā)生改變時,通知程序調(diào)用 onConfigurationChanged()函數(shù)
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP