From 14b04f4ae241fdc2aae18cf0331a2e8afd5915cc Mon Sep 17 00:00:00 2001 From: wangtian Date: Fri, 21 Feb 2025 16:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0setFullScreen=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=85=A8=E5=B1=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangtian --- ohos/src/main/ets/components/plugin/WindowManagerPlus.ets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ohos/src/main/ets/components/plugin/WindowManagerPlus.ets b/ohos/src/main/ets/components/plugin/WindowManagerPlus.ets index 1045515..d563237 100644 --- a/ohos/src/main/ets/components/plugin/WindowManagerPlus.ets +++ b/ohos/src/main/ets/components/plugin/WindowManagerPlus.ets @@ -275,6 +275,11 @@ export default class WindowManagerPlus implements MethodCallHandler { break; case "setFullScreen": const isFullScreen: boolean = getMethodArg(call, 'isFullScreen'); + if(isFullScreen){ + this.windowClass?.maximize(window.MaximizePresentation.FOLLOW_APP_IMMERSIVE_SETTING); + } else { + this.windowClass?.recover(); + } this.windowClass?.setWindowLayoutFullScreen(isFullScreen); result.success(true); break; -- Gitee