W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
UIAbility組件是一種包含UI界面的應用組件,主要用于和用戶交互。
UIAbility組件是系統(tǒng)調度的基本單元,為應用提供繪制界面的窗口;一個UIAbility組件中可以通過多個頁面來實現(xiàn)一個功能模塊。每一個UIAbility組件實例,都對應于一個最近任務列表中的任務。
為使應用能夠正常使用UIAbility,需要在module.json5配置文件的abilities標簽中聲明UIAbility的名稱、入口、標簽等相關信息。
- {
- "module": {
- // ...
- "abilities": [
- {
- "name": "EntryAbility", // UIAbility組件的名稱
- "srcEntrance": "./ets/entryability/EntryAbility.ts", // UIAbility組件的代碼路徑
- "description": "$string:EntryAbility_desc", // UIAbility組件的描述信息
- "icon": "$media:icon", // UIAbility組件的圖標
- "label": "$string:EntryAbility_label", // UIAbility組件的標簽
- "startWindowIcon": "$media:icon", // UIAbility組件啟動頁面圖標資源文件的索引
- "startWindowBackground": "$color:start_window_background", // UIAbility組件啟動頁面背景顏色資源文件的索引
- // ...
- }
- ]
- }
- }
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: