修复心率测量的滑动退出 1979/1 1979/head 1981/target/1
authorCaisking <Casiking@zhihuishixun.com>
Thu, 17 Jul 2025 09:33:26 +0000 (17:33 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Thu, 17 Jul 2025 09:33:26 +0000 (17:33 +0800)
code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartChartView.cpp

index 7bbd2eb..013cfd9 100644 (file)
@@ -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);
 }