增加错误信息提醒界面
authorxue <2144439972@qq.com>
Mon, 29 Sep 2025 07:54:04 +0000 (15:54 +0800)
committerxue <2144439972@qq.com>
Mon, 29 Sep 2025 07:54:04 +0000 (15:54 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdAdjustView.h
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdAdjustView.cpp

index 92ef6ff..9a1062d 100644 (file)
@@ -91,6 +91,7 @@ namespace OHOS
         UIViewGroup *ThunderBirdAdjustViewInit(void);
         void ClearAll(void);
         void Show(int16_t showView);
+        void UpdateTaskReminderText(const char* text);
 
         enum : int16_t {
             THUNDERBIRD_ADJUSTVIEW_BIND_SUCCESS = 0,   // 绑定成功
index 4715b81..98d01db 100644 (file)
@@ -1,4 +1,5 @@
 #include "thunderbird/include/ThunderBirdAdjustView.h"
+#include "thunderbird/include/ThunderBirdMainView.h"
 #include "wearable_log.h"
 #include "common/image_cache_manager.h"
 
@@ -186,7 +187,7 @@ namespace OHOS
         {
             if (TextLabel)
             {
-                TextLabel->SetPosition(112, 148, 180, 42);
+                TextLabel->SetPosition(112, 148, 248, 42);
                 TextLabel->SetText("网络连接失败");
                 TextLabel->SetVisible(true);
             }
@@ -231,6 +232,14 @@ namespace OHOS
             break;
         }
     }
+    void ThunderBirdAdjustView::UpdateTaskReminderText(const char* text)
+    {
+        int16_t currentSubView = ThunderBirdMainView::GetInstance()->GetCurrentSubView();
+        if(currentSubView == THUNDERBIRD_ADJUSTVIEW_WARNING)
+        {
+            if (TextLabel) { TextLabel->SetText(text); }
+        }
+    }
 }