From 4aad8ab5d5390f620b0e222f216d33feaf9c1060 Mon Sep 17 00:00:00 2001 From: zjxi Date: Thu, 26 Dec 2024 11:49:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dapp=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E7=AA=97=E6=A8=A1=E5=BC=8F=E9=A1=B6=E9=83=A8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A0=8F=E8=A7=84=E9=81=BF=E4=BA=8B=E4=BB=B6=E6=9C=AA=E7=94=9F?= =?UTF-8?q?=E6=95=88=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E7=AA=97=E6=A8=A1=E5=BC=8F=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zjxi --- .../flutter/src/main/ets/view/FlutterView.ets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/view/FlutterView.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/view/FlutterView.ets index c11e307b96..afbb97ca41 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/view/FlutterView.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/view/FlutterView.ets @@ -501,7 +501,9 @@ export class FlutterView { } // 根据是否全屏显示,设置标题栏高度(若全屏,则及时规避) - if (this.checkFullScreen && (setFullScreen || this.mainWindow?.getWindowProperties().isLayoutFullScreen)) { // 全屏显示 + let isUseFullScreen = FlutterManager.getInstance().getFullScreenListener().useFullScreen(); + let isLayoutFullScreen = this.mainWindow?.getWindowProperties().isLayoutFullScreen; + if (this.checkFullScreen && (setFullScreen || isLayoutFullScreen || isUseFullScreen)) { // 全屏显示 this.viewportMetrics.physicalViewPaddingTop = this.systemAvoidArea?.topRect.height ?? this.viewportMetrics.physicalViewPaddingTop; this.viewportMetrics.physicalViewPaddingBottom = -- Gitee