From: Caisking <3449750381@qq.com> Date: Fri, 9 Aug 2024 10:09:05 +0000 (+0800) Subject: 设置表盘界面增加表盘控制:目前只有覆盖流生效 X-Git-Tag: release_V1.2.70_20241020_135402~679^2~20 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=84c28efcb75a08e1511e045e40ff548a9cfca144;p=mirrors%2FFD230.git 设置表盘界面增加表盘控制:目前只有覆盖流生效 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialView.cpp b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialView.cpp index 557861d27..1a20e52a9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialView.cpp @@ -76,6 +76,11 @@ namespace OHOS } label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + + // 增加表冠控制 + coverflow_.SetRotateFactor(2); + coverflow_.RequestFocus(); + container_->Add(&coverflow_); container_->Add(&label_); } @@ -86,6 +91,7 @@ namespace OHOS rollerView_.SetItemSize(150, 150); // 150: item size rollerView_.SetThrowDrag(true); rollerView_.SetItemPadding(80); // 80: item padding + container_->Add(&rollerView_); std::vector &dialInfo = presenter_->GetDialInfo(); @@ -105,6 +111,10 @@ namespace OHOS rollerView_.SetOnClickListener(presenter_); rollerView_.SetOnScrollListener(presenter_); + // 增加表冠控制 + rollerView_.SetRotateFactor(2); + rollerView_.RequestFocus(); + label_.SetPosition(127, 50, 200, 50); label_.SetTextColor(Color::White()); label_.SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);