activity屬性設置大全 android:allowTaskReparenting=["true"|"false"] 是否容許activity更換從屬的任務,好比從短信息任務切換到瀏覽器任務。 android:alwaysRetainTaskState=["true"|"false"] 是否保留狀態不變,好比切換回home,再重新打開,activity處於最後的狀態 android:clearTaskOnLaunch=["true""|"false"] 好比P是activity,Q是被P觸發的activity,而後返回Home,重新啓動P,是否顯示Q android:configChanges=[oneormoreof:"mcc""mnc""locale""touchscreen""keyboard""keyboardHidden""navigation""orientation""fontScale"] 當配置list發生修改時,是否調用onConfigurationChanged()方法好比"locale|navigation|orientation". android:enabled=["true"|"false"] activity是否能夠被實例化, android:excludeFromRecents=["true"|"false"] 是否可被顯示在最近打開的activity列表裏 android:exported=["true"|"false"] 是否容許activity被其它程序調用 android:finishOnTaskLaunch=["true"|"false"] 是否關閉已打開的activity當用戶從新啓動這個任務的時候 android:icon="drawableresource" android:label="stringresource" android:launchMode=["multiple"|"singleTop"|"singleTask"|"singleInstance"] activity啓動方式,"standard""singleTop""singleTask""singleInstance"其中前兩個爲一組,後兩個爲一組 android:multiprocess=["true"|"false"] android:name="string" android:noHistory=["true"|"false"] 是否須要移除這個activity當用戶切換到其餘屏幕時。這個屬性是APIlevel3中引入的 android:permission="string" android:process="string" 一個activity運行時所在的進程名,全部程序組件運行在應用程序默認的進程中,這個進程名跟應用程序的包名一致。 <application>中的元素process屬性可以爲全部組件設定一個新的默認值。可是任何組件均可以覆蓋這個默認值,容許你 將你的程序放在多進程中運行。若是這個屬性被分配的名字以:開頭,當這個activity運行時,一個新的專屬於這個程序的 進程將會被建立。若是這個進程名以小寫字母開頭,這個activity將會運行在全局的進程中,被它的許可所提供。 android:screenOrientation=["unspecified"|"user"|"behind"|"landscape"|"portrait"|"sensor"|"nonsensor"] activity顯示的模式,"unspecified"默認值"landscape"風景畫模式,寬度比高度大一些"portrait"肖像模式,高度比 寬度大。"user"用戶的設置"behind""sensor""nosensor" android:stateNotNeeded=["true"|"false"] 是否activity被銷燬和成功重啓並不保存狀態 android:taskAffinity="string" activity的親屬關係,默認狀況同一個應用程序下的activity有相同的關係 android:theme="resourceortheme" activity的樣式主題,若是沒有設置,則activity的主題樣式從屬於應用程序,參見<application>元素的theme屬性 android:windowSoftInputMode=[oneormoreof:"stateUnspecified""stateUnchanged""stateHidden""stateAlwaysHidden" "stateVisible""stateAlwaysVisible""adjustUnspecified""adjustResize""adjustPan"]> activity主窗口與軟鍵盤的交互模式,自從APIlevel3被引入