鸿蒙(HarmonyOS)应用开发——应用程序入口UIAbility(题目答案)

判断题

1.一个应用只能有一个UIAbility。
错误(False)

解析:可以有多个,也可以有一个

2.创建的Empty Ability模板工程,初始会生成一个UIAbility文件。
正确(True)

3.每调用一次router.pushUrl()方法,页面路由栈数量均会加1。

错误(False)

解析: pushUrl()有两种模式,一种单实例模式,一种是多实例模式;单实例的栈数量是不变的,多实例模式会加1

单选题

1.API9及以上,router.pushUrl()方法,默认的跳转页面使用的模式是哪一种?

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参数可以配置为以下哪几种跳转页面使用的模式?

A. Standard

B. Single

C. Specified

AB

2.UIAbility的生命周期有哪几个状态?

A. Create

B. WindowStageCreate

C. Foreground

D. Background

E. WindowStageDestroy

F. Destroy

ACDF

3.UIAbility有哪几种的启动模式?

A. multiton

B. singleton

C. specified

ABC

相关推荐
Hstar_chen4 小时前
开源一款 HarmonyOS 服务器监控客户端:星辰云巡 1.0.3
服务器·华为·harmonyos
2501_9197490311 小时前
华为鸿蒙免费视频播放器APP—小羊免费播放器
华为·harmonyos·鸿蒙
2501_9197490312 小时前
华为鸿蒙免费背书背课文背稿子APP—小羊背诵
华为·harmonyos·鸿蒙
OH_TPC13 小时前
HarmonyOS APP开发---"随手画"白板涂鸦App,需要用到这个库
harmonyos
lilian23314 小时前
HarmonyOS 7 新特性(二十六)|LazyLayoutAlgorithm 自定义懒布局
华为·harmonyos
lilian23315 小时前
HarmonyOS 7 新特性(二十九)|游戏伴随服务:悬浮协作与质量降级
游戏·语音识别·harmonyos
王二蛋与他的张大花15 小时前
让小艺替我回答“还有多久下班“——摸鱼鸭的 HarmonyOS 7 Skill 接入实战
harmonyos
hunterandroid15 小时前
[鸿蒙从零到一] HarmonyOS 冷启动瀑布图分析与关键路径裁剪实战
前端·华为
用户09340777351416 小时前
HarmonyOS WPS Open SDK 实践:把水印与修订收成打开策略层
android·typescript·harmonyos
Veer Han18 小时前
DevEco CLI 实战:鸿蒙 App「宝贝日程表」从 0 开发到正式上架
华为·harmonyos