判斷題
1.一個應(yīng)用只能有一個UIAbility。
錯誤(False)
解析:可以有多個,也可以有一個
2.創(chuàng)建的Empty Ability模板工程,初始會生成一個UIAbility文件。
正確(True)
3.每調(diào)用一次router.pushUrl()方法,頁面路由棧數(shù)量均會加1。
錯誤(False)
解析: pushUrl()有兩種模式,一種單實例模式,一種是多實例模式;單實例的棧數(shù)量是不變的,多實例模式會加1
單選題
1.API9及以上,router.pushUrl()方法,默認的跳轉(zhuǎn)頁面使用的模式是哪一種?
A. standard
B. Single
C. Specified
A
2.UIAbility啟動模式需要在module.json5文件中配置哪個字段?
A. module
B. skills
C. launchType
D. abilities
C
多選題
1.API9及以上,router.pushUrl()方法的mode參數(shù)可以配置為以下哪幾種跳轉(zhuǎn)頁面使用的模式?
A. Standard
B. Single
C. Specified
AB
2.UIAbility的生命周期有哪幾個狀態(tài)?
A. Create
B. WindowStageCreate
C. Foreground
D. Background
E. WindowStageDestroy
F. Destroy
ACDF
3.UIAbility有哪幾種的啟動模式?
A. multiton
B. singleton
C. specified文章來源:http://www.zghlxwxcb.cn/news/detail-760698.html
ABC文章來源地址http://www.zghlxwxcb.cn/news/detail-760698.html
到了這里,關(guān)于鴻蒙(HarmonyOS)應(yīng)用開發(fā)——應(yīng)用程序入口UIAbility(題目答案)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!