From: Caisking Date: Thu, 17 Jul 2025 09:33:26 +0000 (+0800) Subject: 修复心率测量的滑动退出 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~210^2~25^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0546fd704daa551846b7cc812ff24aeccebf0077;p=mirrors%2FFD230.git 修复心率测量的滑动退出 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartChartView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartChartView.cpp index 7bbd2eb49..013cfd982 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartChartView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartChartView.cpp @@ -644,10 +644,13 @@ void HeartChartView::OnStart() { SetDataTopAndBottom(); HeartbeatImageAnimatorStart(); + scrollView->SetDraggable(true); + scrollView->SetTouchable(true); + scrollView->SetOnDragListener(presenter_); + // 增加按键监听 - RootView::OnKeyActListener *keyactListener = - (RootView::OnKeyActListener *)OHOS::HeartChartPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::HeartChartPresenter::GetInstance(); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); AddViewToRootContainer(scrollView); }