From 7994d9398183789fdcef1c5ac404df66afc6d59c Mon Sep 17 00:00:00 2001 From: l30054665 Date: Wed, 2 Apr 2025 15:28:32 +0800 Subject: [PATCH 1/6] message Signed-off-by: l30054665 --- display/AppScope/app.json | 4 ++-- display/entry/src/main/ets/pages/InputPinDialog.ets | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/display/AppScope/app.json b/display/AppScope/app.json index 14c36944e..c7b1de6ab 100644 --- a/display/AppScope/app.json +++ b/display/AppScope/app.json @@ -2,8 +2,8 @@ "app": { "bundleName": "com.ohos.devicemanagerui", "vendor": "example", - "versionCode": 1000038, - "versionName": "1.0.38", + "versionCode": 1000039, + "versionName": "1.0.39", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 10, diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index 1add1ade8..4e33a89fc 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -68,6 +68,7 @@ struct InputCustomDialog { let ims = inputMethod.getSetting(); ims.on('imeShow', (info: Array) => { this.scroller.scrollTo({yOffset: 72, xOffset: 0}); + }); if (AppStorage.get('mediaQueryResult') != null && AppStorage.get('mediaQueryResult') as boolean) { this.heightNum = 100; -- Gitee From 9a6ba2a06cec43543c6babeeacc837f256bd4089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=9A?= Date: Wed, 2 Apr 2025 07:42:30 +0000 Subject: [PATCH 2/6] update display/entry/src/main/ets/pages/InputPinDialog.ets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李尚 --- display/entry/src/main/ets/pages/InputPinDialog.ets | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index 4e33a89fc..beef88272 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -43,7 +43,9 @@ struct InputCustomDialog { @State targetDeviceName: string = ''; @State model: string = MODEL_PIN; @State isPC: boolean = false; + @State isPhone: boolean = false; @State btnColor: ResourceColor = Color.Transparent; + @State mLocalHeight: number = display.getDefaultDisplaySync().height; listener: mediaquery.MediaQueryListener = mediaquery.matchMediaSync('(orientation: landscape)'); controller?: CustomDialogController; private scroller: Scroller = new Scroller(); @@ -65,13 +67,19 @@ struct InputCustomDialog { aboutToAppear() { console.info(TAG + 'InputCustomDialog aboutToAppear'); this.isPC = Constant.isPC(); + this.isPhone = Constant.isPhone(); let ims = inputMethod.getSetting(); ims.on('imeShow', (info: Array) => { this.scroller.scrollTo({yOffset: 72, xOffset: 0}); }); - if (AppStorage.get('mediaQueryResult') != null && AppStorage.get('mediaQueryResult') as boolean) { - this.heightNum = 100; + if (AppStorage.get('mediaQueryResult') != null && AppStorage.get('mediaQueryResult') as boolean && this.isPhone) { + let heightRatio = px2vp(this.mLocalHeight) * 0.2; + if (display.isFoldable() && display.getFoldDisplayMode() == display.FoldDisplayMode.FOLD_DISPLAY_MODE_MAIN) { + this.heightNum = heightRatio; + } else if (!display.isFoldable()) { + this.heightNum = heightRatio; + } } if (AppStorage.get('targetDeviceName') != null) { this.targetDeviceName = AppStorage.get('targetDeviceName') as string; -- Gitee From 1ede89234dff0200fbfdf420f859e18e7e406270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=9A?= Date: Wed, 2 Apr 2025 07:44:48 +0000 Subject: [PATCH 3/6] update display/entry/src/main/ets/pages/InputPinDialog.ets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李尚 --- display/entry/src/main/ets/pages/InputPinDialog.ets | 1 - 1 file changed, 1 deletion(-) diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index beef88272..787fb83c4 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -71,7 +71,6 @@ struct InputCustomDialog { let ims = inputMethod.getSetting(); ims.on('imeShow', (info: Array) => { this.scroller.scrollTo({yOffset: 72, xOffset: 0}); - }); if (AppStorage.get('mediaQueryResult') != null && AppStorage.get('mediaQueryResult') as boolean && this.isPhone) { let heightRatio = px2vp(this.mLocalHeight) * 0.2; -- Gitee From 50352558d5c8285b48582e7db65fd2d587ccef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=9A?= Date: Wed, 2 Apr 2025 09:41:26 +0000 Subject: [PATCH 4/6] update display/entry/src/main/ets/pages/InputPinDialog.ets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李尚 --- display/entry/src/main/ets/pages/InputPinDialog.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index 787fb83c4..def55f776 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -52,7 +52,7 @@ struct InputCustomDialog { onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { if (mediaQueryResult.matches as boolean) { - this.heightNum = 100; + this.heightNum = 300; } else { this.heightNum = 800; } -- Gitee From cf8b175510671249cab0b71f90c26c34717f5645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=9A?= Date: Mon, 7 Apr 2025 07:56:40 +0000 Subject: [PATCH 5/6] update display/entry/src/main/ets/pages/InputPinDialog.ets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李尚 --- display/entry/src/main/ets/pages/InputPinDialog.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index def55f776..2469b4b6c 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -74,7 +74,7 @@ struct InputCustomDialog { }); if (AppStorage.get('mediaQueryResult') != null && AppStorage.get('mediaQueryResult') as boolean && this.isPhone) { let heightRatio = px2vp(this.mLocalHeight) * 0.2; - if (display.isFoldable() && display.getFoldDisplayMode() == display.FoldDisplayMode.FOLD_DISPLAY_MODE_MAIN) { + if (display.isFoldable() && display.getFoldDisplayMode() === display.FoldDisplayMode.FOLD_DISPLAY_MODE_MAIN) { this.heightNum = heightRatio; } else if (!display.isFoldable()) { this.heightNum = heightRatio; -- Gitee From 09ea11148cc86bc21247f32bc2bc5309e9416add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=9A?= Date: Mon, 7 Apr 2025 12:06:52 +0000 Subject: [PATCH 6/6] update display/entry/src/main/ets/pages/InputPinDialog.ets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李尚 --- display/entry/src/main/ets/pages/InputPinDialog.ets | 1 + 1 file changed, 1 insertion(+) diff --git a/display/entry/src/main/ets/pages/InputPinDialog.ets b/display/entry/src/main/ets/pages/InputPinDialog.ets index 2469b4b6c..97b3ab44e 100644 --- a/display/entry/src/main/ets/pages/InputPinDialog.ets +++ b/display/entry/src/main/ets/pages/InputPinDialog.ets @@ -16,6 +16,7 @@ import deviceManager from '@ohos.distributedHardware.deviceManager'; import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession' import mediaquery from '@ohos.mediaquery'; import deviceInfo from '@ohos.deviceInfo'; +import display from '@ohos.display'; import inputMethod from '@ohos.inputMethod'; import Constant from '../common/constant'; import accessibility from '@ohos.accessibility'; -- Gitee