HarmonyOS 鸿蒙Next 华为平行世界分屏问题

发布于 1周前 作者 yibo5220 最后一次编辑是 5天前 来自 鸿蒙OS

HarmonyOS 鸿蒙Next 华为平行世界分屏问题

机型:HUAWEI MatePad Pro

PAD型号:WGR-W09

版本号:2.0.0.4(SP8DGTC00E1R1P10)

内核版本:4.14.116

问题原因:我把某个独立的Activity页面设置为不需要平行世界,但是在横竖屏切换的时候,还是被分了屏。(红框部分的Activity,我不想让它分屏)

cke_11601.png

这是我的easyGo配置:

H5AppActivity就是我不需要分屏的Activity

{
“easyGoVersion”: “1.0”,
“client”: “com.xxx.xxx.pad”,
“logicEntities”: [
{
“head”: {
“function”: “magicwindow”,
“required”: “true”
},
“body”: {
“mode”: “1”,
“defaultDualActivities”: {
“mainPages”: “com.xxx.xxx.presentation.ui.activity.launch.MainActivity”,
“relatedPage”: “com.xxx.xxx.presentation.ui.activity.black.BlackActivity”
},
“activityPairs”: [
{
“from”: “com.xxx.xxx.presentation.ui.activity.launch.MainActivity”,
“to”: “*”
}
],
“transActivities”: [

            ]</span>,
            "<span class="hljs-attribute">Activities</span>": <span class="hljs-value">[
                {
                    "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"com.xxx.xxx.presentation.ui.activity.h5.H5AppActivity"</span></span>,
                    "<span class="hljs-attribute">defaultFullScreen</span>": <span class="hljs-value"><span class="hljs-string">"true"</span>
                </span>}
            ]</span>,
            "<span class="hljs-attribute">UX</span>": <span class="hljs-value">{
                "<span class="hljs-attribute">windowsRatio</span>": <span class="hljs-value">[
                    {
                        "<span class="hljs-attribute">device</span>": <span class="hljs-value"><span class="hljs-string">"FOLD"</span></span>,
                        "<span class="hljs-attribute">ratio</span>": <span class="hljs-value"><span class="hljs-string">"1056|1138"</span>
                    </span>},
                    {
                        "<span class="hljs-attribute">device</span>": <span class="hljs-value"><span class="hljs-string">"PAD"</span></span>,
                        "<span class="hljs-attribute">ratio</span>": <span class="hljs-value"><span class="hljs-string">"900|1654"</span>
                    </span>}
                ]</span>,
                "<span class="hljs-attribute">supportRotationUxCompat</span>": <span class="hljs-value"><span class="hljs-string">"false"</span></span>,
                "<span class="hljs-attribute">supportCameraPreview</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
                "<span class="hljs-attribute">needCorrectDisplayRotation</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
                "<span class="hljs-attribute">needCorrectDisplaySize</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
                "<span class="hljs-attribute">showStatusBar</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
                "<span class="hljs-attribute">splitLineBgColor</span>": <span class="hljs-value"><span class="hljs-string">"0xff191919"</span></span>,
                "<span class="hljs-attribute">splitBarBgColor</span>": <span class="hljs-value"><span class="hljs-string">"0xffe5e5e5"</span></span>,
                "<span class="hljs-attribute">draggingToFreeForm</span>": <span class="hljs-value"><span class="hljs-string">"app"</span></span>,
                "<span class="hljs-attribute">keepPrimaryTopAlwaysResume</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
                "<span class="hljs-attribute">useSystemActivityAnimation</span>": <span class="hljs-value"><span class="hljs-string">"false"</span>
            </span>}</span>,
            "<span class="hljs-attribute">ignoreSensorRestriction</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
            "<span class="hljs-attribute">ignoreRealSizeRestriction</span>": <span class="hljs-value"><span class="hljs-string">"true"</span></span>,
            "<span class="hljs-attribute">ignoreCameraRotation</span>": <span class="hljs-value"><span class="hljs-string">"true"</span>
        </span>}
    </span>}
]

}

3 回复
H5AppActivity就是我不需要分屏的Activity,我按照你发的链接里面配置了 "defaultFullScreen": "true" 。并且在清单文件里面配置这个activity为 
  1. android:screenOrientation = “sensorLandscape” 。两种配置都加了,但是还是没有生效。频繁横竖屏切换的时候,还是会出现分屏

针对HarmonyOS鸿蒙Next华为平行世界分屏问题,以下是一些可能的解决方案:

一、检查应用配置

确保在开发应用中,针对不需要分屏的Activity,已正确配置了“defaultFullScreen”为“true”。同时,检查其他相关配置,如“android:screenOrientation”等,确保它们不会干扰分屏设置。

二、系统级设置

  1. 尝试在系统设置中查找是否有关于平行世界分屏的开关或选项,进行相应调整。
  2. 检查是否开启了智能分屏或类似功能,这些功能可能会影响分屏行为。

三、重启设备

有时,简单的重启设备可以解决一些临时的系统或应用问题,包括分屏问题。

四、更新系统

确保设备已升级到最新的HarmonyOS版本,因为新版本可能修复了旧版本中的分屏问题。

鸿蒙Next高级实战已发布,可以先学学https://www.itying.com/goods-1204.html

回到顶部