优化网络状态提示,对话中拒收错误提示信息
authorxue <2144439972@qq.com>
Sun, 30 Nov 2025 07:34:47 +0000 (15:34 +0800)
committerxue <2144439972@qq.com>
Sun, 30 Nov 2025 07:34:47 +0000 (15:34 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdMainView.h
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp

index ce3d616..1847ff3 100644 (file)
@@ -112,6 +112,7 @@ namespace OHOS
         UIBoxProgress *progress{nullptr};            // 电池进度条
         UIImageView *chargeBatteryicon{nullptr};     // 充电图标
         bool isChargeBatteryIconVisible{false};      // 充电图标是否可见
+        UIImageView *earphoneIcon{nullptr};          // 耳机图标
 
         int16_t Batteryvalue{0};                    // 电池电量
 
index e5640c6..7aa2155 100644 (file)
@@ -1024,7 +1024,7 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "timeLabel new fail");
             return nullptr;
         }
-        timeLabel->SetPosition(0, 4, 60, 33);
+        timeLabel->SetPosition(0, 8, 60, 33);
         timeLabel->SetViewId("timeLabel");
         timeLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 24);
         timeLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
@@ -1036,12 +1036,12 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "timeLabelBlack new fail");
             return nullptr;
         }
-        timeLabelBlack->SetPosition(2, 6, 60, 33); // 位置偏移+2
+        timeLabelBlack->SetPosition(2, 10, 60, 33); // 位置偏移+2
         timeLabelBlack->SetViewId("timeLabelBlack");
         timeLabelBlack->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 24);
         timeLabelBlack->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
         timeLabelBlack->SetStyle(STYLE_TEXT_COLOR, Color::Black().full); // 黑色
-        timeLabelBlack->SetVisible(true);
+        timeLabelBlack->SetVisible(false);
         timeLabelBlack->SetText(ThunderBirdModel::GetInstance()->GetCurrentTimeStr().c_str()); // 每秒变化
         group1->Add(timeLabelBlack);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "timeLabelBlack add success - Position: (2,6) Size: (60,33) Color: Black");
@@ -1050,6 +1050,22 @@ namespace OHOS
         timeLabel->SetText(ThunderBirdModel::GetInstance()->GetCurrentTimeStr().c_str()); // 每秒变化
         group1->Add(timeLabel);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "timeLabel add success");
+
+        /* -------------------------------- 耳机图标 -------------------------------- */
+        earphoneIcon = new UIImageView();
+        if (earphoneIcon == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "earphoneIcon new fail");
+            return nullptr;
+        }
+        earphoneIcon->SetAutoEnable(false);
+        earphoneIcon->SetPosition(62, 12, 16, 23);
+        earphoneIcon->SetResizeMode(UIImageView::COVER);
+        earphoneIcon->SetSrc("/user/res/bule_connect.bin");
+        earphoneIcon->SetVisible(false);
+        group1->Add(earphoneIcon);
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "earphoneIcon add success");
+        /* -------------------------------------------------------------------------- */
         /* -------------------------------- NoSignal -------------------------------- */
         if (NoSignal == nullptr)
         {
index 67ce0c9..e0ef874 100644 (file)
@@ -538,7 +538,7 @@ namespace OHOS
         if (RemindButton)
         {
             RemindButton->SetPosition(85, 114, 210, 59);
-            RemindButton->SetText("等待网络连接");
+            RemindButton->SetText("服务器连接中");
         }
         if (RemindIcon)
             {