From e065862d2cb8a86ac9f8d80a9fa5f2f596c58b4d Mon Sep 17 00:00:00 2001 From: dengxiaoyu Date: Mon, 31 Mar 2025 10:43:26 +0800 Subject: [PATCH] fix ux issue Signed-off-by: dengxiaoyu --- application/AppScope/app.json | 4 ++-- application/AppScope/app.json5 | 4 ++-- .../resources/base/profile/configuration.json | 5 +++++ .../entry/src/main/ets/pages/ContinueSwitch.ets | 9 ++++++++- .../entry/src/main/resources/base/element/float.json | 12 ++++++++++++ 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 application/AppScope/resources/base/profile/configuration.json create mode 100644 application/entry/src/main/resources/base/element/float.json diff --git a/application/AppScope/app.json b/application/AppScope/app.json index 4a2224e5..07971b1d 100644 --- a/application/AppScope/app.json +++ b/application/AppScope/app.json @@ -2,8 +2,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000037, - "versionName": "1.0.37", + "versionCode": 10000038, + "versionName": "1.0.38", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/AppScope/app.json5 b/application/AppScope/app.json5 index 29dc8935..d0d89633 100644 --- a/application/AppScope/app.json5 +++ b/application/AppScope/app.json5 @@ -16,8 +16,8 @@ "app": { "bundleName": "com.ohos.dhardwareui", "vendor": "example", - "versionCode": 10000037, - "versionName": "1.0.37", + "versionCode": 10000038, + "versionName": "1.0.38", "icon": "$media:app_icon", "label": "$string:app_name", "minAPIVersion": 12, diff --git a/application/AppScope/resources/base/profile/configuration.json b/application/AppScope/resources/base/profile/configuration.json new file mode 100644 index 00000000..e4a0a9ff --- /dev/null +++ b/application/AppScope/resources/base/profile/configuration.json @@ -0,0 +1,5 @@ +{ + "configuration": { + "fontSizeScale": "followSystem" + } +} \ No newline at end of file diff --git a/application/entry/src/main/ets/pages/ContinueSwitch.ets b/application/entry/src/main/ets/pages/ContinueSwitch.ets index 007d150c..07688eb0 100644 --- a/application/entry/src/main/ets/pages/ContinueSwitch.ets +++ b/application/entry/src/main/ets/pages/ContinueSwitch.ets @@ -324,7 +324,9 @@ struct ContinueSwitch { } .margin({ bottom: CommonConstants.CONTINUE_DESC_TEXT_MARGIN_BOTTOM, - top: CommonConstants.CONTINUE_DESC_TEXT_MARGIN_TOP + top: CommonConstants.CONTINUE_DESC_TEXT_MARGIN_TOP, + left: $r('app.float.margin_8'), + right: $r('app.float.margin_8') }) .textAlign(TextAlign.Center) .width('100%') @@ -453,6 +455,9 @@ struct ContinueSwitch { .onAreaChange((oldArea: Area, newArea: Area) => { logger.info(`${TAG} Scroll, oldArea.height = ${oldArea.height}, newArea.height = ${newArea.height}`); }) + + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.Auto }) + .position({ right: 0, bottom: 16 }) } build() { @@ -490,6 +495,8 @@ struct ContinueSwitch { } logger.info(`${TAG} this.imageAnimatorWidth = ${this.imageAnimatorWidth}, this.imageAnimatorHeight = ${this.imageAnimatorHeight}`); }) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) + .padding({ bottom: $r('app.float.margin_16') }) } private getContentVisibility(): Visibility { diff --git a/application/entry/src/main/resources/base/element/float.json b/application/entry/src/main/resources/base/element/float.json new file mode 100644 index 00000000..64bf2941 --- /dev/null +++ b/application/entry/src/main/resources/base/element/float.json @@ -0,0 +1,12 @@ +{ + "float": [ + { + "name": "margin_8", + "value": "8vp" + }, + { + "name": "margin_16", + "value": "16vp" + } + ] +} \ No newline at end of file -- Gitee