优化血氧功能的滑动逻辑
authorCaisking <3449750381@qq.com>
Sun, 3 Mar 2024 03:29:24 +0000 (11:29 +0800)
committerCaisking <3449750381@qq.com>
Sun, 3 Mar 2024 03:29:24 +0000 (11:29 +0800)
code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenView.cpp
code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodResultView.cpp

index 1e47053..b076755 100644 (file)
@@ -75,7 +75,7 @@ namespace OHOS
     void BloodOxygenView::Upspo2data()
     {
         uint16_t spo2_ = BloodOxygenModel::GetInstance()->GetSPO2data();
-        //WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetSPO2Data %d", spo2_);
+        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetSPO2Data %d", spo2_);
         std::string bloodoxygenStr = std::to_string(spo2_);
         percent->SetText(bloodoxygenStr.c_str());
     }
@@ -204,6 +204,7 @@ namespace OHOS
         BloodScrollView[BLOODVIEW]->SetOnDragListener(draglistener);
         BloodScrollView[BLOODVIEW]->SetTouchable(true);
         BloodScrollView[BLOODVIEW]->SetDraggable(true);
+        BloodScrollView[BLOODVIEW]->SetVerticalScrollState(false); // 禁止纵向滑动
         /* -------------------------------------------------------------------------- */
         if (InitImageDisplay() == false)
         {
index 2d107a6..da68c46 100644 (file)
@@ -37,7 +37,7 @@ namespace OHOS
     BloodResultView::BloodResultView()
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BloodBandoffView::BloodBandoffView");
-        
+
         g_pMainView = this;
     }
 
@@ -181,6 +181,7 @@ namespace OHOS
         BloodResultScrollView->SetOnDragListener(draglistener);
         BloodResultScrollView->SetTouchable(true);
         BloodResultScrollView->SetDraggable(true);
+        BloodResultScrollView->SetHorizontalScrollState(false); // 禁止横向滑动
         /* -------------------------------------------------------------------------- */
         if (InitImageDisplay() == false)
         {