如何修改桌面的代码固定桌面方向

最近驱动适配出现了一个问题,通过设置display_manager_config.xml的值后,锁屏和应用界面是旋转的,但桌面却没有,猜测是launcher在获得屏幕参数时出现了问题,想请教各位大佬如何通过修改桌面代码来指定桌面的方向呢
您需要先 登录 才能评论/回答

全部评论(11)
想问下怎么解决的

2025-07-02 09:29:21
应用module.json5中
"abilities": [{
"name": "EntryAbility",
"orientation": "landscape" //设置为固定横屏
"orientation": "portrait" //设置为固定竖屏
"orientation": "auto_rotation" //屏幕自动旋转
}]

2025-02-18 15:13:28
应用module.json5中 "abilities": [{ "name": "EntryAbility", "orientation": "landscape" //修改这个 }]

2025-02-18 11:47:26
引用:“把附件的launcher hap替换到system/app/com.ohos.launcher 目录 然后清下data 重启试试。”
大神,请问一下是这样改?我这样改完以后是还是没有横屏过来,界面依然是竖屏,而且快捷栏显示在半中间


引用:“把附件的launcher hap替换到system/app/com.ohos.launcher 目录 然后清下data 重启试试。”
请问一下大佬,这一步是在哪里替换的,我在系统源码里面,没找到"abilities": [{ "name": "EntryAbility", "orientation": "landscape" //修改这个 }]

引用:“这是v4.1源码里面的吗,我想编译出镜像”
把附件的launcher hap替换到system/app/com.ohos.launcher 目录 然后清下data 重启试试。

查看全部11条回答/评论