From: xue <2144439972@qq.com> Date: Mon, 2 Feb 2026 05:56:59 +0000 (+0800) Subject: 增加信息界面的表冠滑动 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=4245c2b15a2848f35bd8f89e1688d11d7de1a0e7;p=mirrors%2FFD230.git 增加信息界面的表冠滑动 --- diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageCardView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageCardView.cpp index 2dddf4028..2451a3989 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageCardView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageCardView.cpp @@ -93,6 +93,8 @@ namespace OHOS MessageList->SetOnClickListener((UIView::OnClickListener *)OHOS::MessageControlPresenter::GetInstance()); MessageList->SetIntercept(true); + MessageList->SetRotateFactor(2); // 表冠控制滑动 + MessageList->RequestFocus(); Add(MessageList); MessageList->SetAdapter(p_MessageListAdapter); diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageShowView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageShowView.cpp index 3bde4c7e7..fbbfc7c46 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageShowView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageShowView.cpp @@ -267,6 +267,8 @@ namespace OHOS scrollView_->SetOnDragListener(presenter_); scrollView_->SetTouchable(true); scrollView_->SetDraggable(true); + scrollView_->SetRotateFactor(1.0); // 表冠控制滑动 + scrollView_->RequestFocus(); // scrollView_->SetStyle(STYLE_BACKGROUND_COLOR, BACK_GROUND_COLOR); scrollView_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageView.cpp index aabcba27f..d65d087c2 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/message/src/MessageView.cpp @@ -171,10 +171,13 @@ MessageList->SetSwipeACCLevel(200); MessageList->SetDragACCLevel(5); MessageList->SetIntercept(true); - + + MessageList->SetRotateFactor(2); // 表冠控制滑动 + MessageList->RequestFocus(); + MessageList->SetOnClickListener(presenter_); messageView->SetOnDragListener(presenter_); - + messageView->Add(MessageList); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MessageList is add"); AddViewToRootContainer(messageView);