From 295ef5098ee901b21920fe7a09c24ffec0e7ca95 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Sun, 30 Nov 2025 15:34:47 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E7=BD=91=E7=BB=9C=E7=8A=B6?= =?utf8?q?=E6=80=81=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=AF=B9=E8=AF=9D=E4=B8=AD?= =?utf8?q?=E6=8B=92=E6=94=B6=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?utf8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../thunderbird/include/ThunderBirdMainView.h | 1 + .../thunderbird/src/ThunderBirdMainView.cpp | 22 ++++++++++++++++--- .../src/ThunderBirdReminderView.cpp | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdMainView.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdMainView.h index ce3d61614..1847ff3d6 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdMainView.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdMainView.h @@ -112,6 +112,7 @@ namespace OHOS UIBoxProgress *progress{nullptr}; // 电池进度条 UIImageView *chargeBatteryicon{nullptr}; // 充电图标 bool isChargeBatteryIconVisible{false}; // 充电图标是否可见 + UIImageView *earphoneIcon{nullptr}; // 耳机图标 int16_t Batteryvalue{0}; // 电池电量 diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp index e5640c651..7aa2155ab 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp @@ -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) { diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp index 67ce0c9d1..e0ef8740c 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp @@ -538,7 +538,7 @@ namespace OHOS if (RemindButton) { RemindButton->SetPosition(85, 114, 210, 59); - RemindButton->SetText("等待网络连接"); + RemindButton->SetText("服务器连接中"); } if (RemindIcon) { -- 2.17.1