From 13b16fdc39e915517e9d2ee80453b9c54aec14b2 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Tue, 23 Jul 2024 14:19:58 +0800 Subject: [PATCH] =?utf8?q?=E8=AE=BE=E7=BD=AE=E8=A7=86=E5=9B=BE=E4=BC=98?= =?utf8?q?=E5=8C=96=E8=A1=A8=E5=86=A0=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/settings/src/SettingView.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp index 02a307348..94efc0bb2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-07-12 09:55:29 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-07-22 11:33:17 + * @LastEditTime: 2024-07-22 18:30:57 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp */ @@ -84,7 +84,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingView::OnStart::scrollView is nullptr"); return; } - scrollView->Resize(HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + scrollView->SetPosition(0, 0, 466, 466); scrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); scrollView->SetStyle(STYLE_BACKGROUND_OPA, UN_OPACITY); scrollView->SetScrollBlankSize(SETTING_SCROLLBLANKSIZE); @@ -125,12 +125,13 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingView::OnStart::contentList is nullptr"); return; } - contentList->SetPosition(SETTING_LIST_POSITION_X, SETTING_LIST_POSITION_Y, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + contentList->SetPosition(SETTING_LIST_POSITION_X, SETTING_LIST_POSITION_Y, 380, 400); contentList->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); - contentList->SetScrollBlankSize(SETTING_SCROLLBLANKSIZE); - contentList->SetSelectPosition(HORIZONTAL_RESOLUTION / SNUM_2); // middle position + contentList->SetScrollBlankSize(75); + // contentList->SetSelectPosition(820 / SNUM_2); // middle position contentList->SetDraggable(true); contentList->SetThrowDrag(true); + contentList->EnableAutoAlign(true); contentList->SetReboundSize(REBOUNDSIZE); contentList->SetMaxScrollDistance(MAX_SCR_DIS); contentList->RequestFocus(); -- 2.17.1