From: xue <2144439972@qq.com> Date: Sun, 30 Nov 2025 07:33:02 +0000 (+0800) Subject: 优化蓝牙界面 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=9629964cfe1f5f26351b2eaa26334bab34bc3988;p=mirrors%2FFD230.git 优化蓝牙界面 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueListAdapter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueListAdapter.cpp index 549550c38..e3db5bfc2 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueListAdapter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueListAdapter.cpp @@ -20,7 +20,7 @@ constexpr uint16_t LABEL_FONT_SIZE = 18; constexpr uint16_t SECTION_FONT_SIZE = 14; // 颜色定义 -constexpr int64_t COLOR_ITEM_BG = 0xFF4D4D4D; // 设备项背景色(深灰) +constexpr int64_t COLOR_ITEM_BG = 0xFFAD590B; // 设备项背景色(深灰) constexpr int64_t COLOR_BORDER_SELECTED = 0xFFED6C00; // 选中边框颜色(橙色) constexpr int64_t COLOR_TEXT_WHITE = 0xFFFFFFFF; // 白色文字 constexpr int64_t COLOR_TEXT_GRAY = 0xFFCCCCCC; // 灰色文字(分组标题) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueView.cpp index eb52bbd59..ab2ff2a26 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdBlueView.cpp @@ -501,7 +501,7 @@ namespace OHOS if (RemindLabel) { RemindLabel->SetPosition(66, 275, 272, 25); - RemindLabel->SetText("按 / 选择 按 确认"); + RemindLabel->SetText("按 重新扫描 按 确认"); RemindLabel->SetVisible(true); } if (RemindLabel_2) @@ -572,19 +572,19 @@ namespace OHOS } if (RemindIcon) { - RemindIcon->SetPosition(68, 127, 36, 36); + RemindIcon->SetPosition(65, 127, 36, 36); RemindIcon->SetSrc("/user/res/completed.bin"); RemindIcon->SetVisible(true); } if (RemindIcon1) { - RemindIcon1->SetPosition(68, 262, 22, 22); + RemindIcon1->SetPosition(65, 260, 22, 22); RemindIcon1->SetSrc("/user/res/volume_down.bin"); RemindIcon1->SetVisible(true); } if (RemindIcon2) { - RemindIcon2->SetPosition(183, 262, 22, 22); + RemindIcon2->SetPosition(205, 260, 22, 22); RemindIcon2->SetSrc("/user/res/volume_up.bin"); RemindIcon2->SetVisible(true); } @@ -601,7 +601,7 @@ namespace OHOS if (TextLabel) { TextLabel->SetPosition(30, 124, 300, 42); - TextLabel->SetText("确定要断开连接吗"); + TextLabel->SetText("确认要断开蓝牙连接吗"); TextLabel->SetVisible(true); } if (TextLabel_2)//已连接到 @@ -617,7 +617,7 @@ namespace OHOS if (RemindLabel) { RemindLabel->SetPosition(80, 275, 200, 25); - RemindLabel->SetText("按 退出 按 重试"); + RemindLabel->SetText("按 退出 按 确认"); RemindLabel->SetVisible(true); } if (RemindLabel_2) @@ -628,13 +628,13 @@ namespace OHOS } if (RemindIcon1) { - RemindIcon1->SetPosition(105, 276, 22, 22); + RemindIcon1->SetPosition(102, 276, 22, 22); RemindIcon1->SetSrc("/user/res/volume_down.bin"); RemindIcon1->SetVisible(true); } if (RemindIcon2) { - RemindIcon2->SetPosition(211, 276, 22, 22); + RemindIcon2->SetPosition(208, 276, 22, 22); RemindIcon2->SetSrc("/user/res/volume_up.bin"); RemindIcon2->SetVisible(true); } @@ -656,8 +656,8 @@ namespace OHOS } if (RemindLabel) { - RemindLabel->SetPosition(136, 275, 88, 25); - RemindLabel->SetText("按 完成"); + RemindLabel->SetPosition(80, 275, 200, 25); + RemindLabel->SetText("按 返回 按 重连"); RemindLabel->SetVisible(true); } if (RemindIcon) @@ -668,10 +668,16 @@ namespace OHOS } if (RemindIcon1) { - RemindIcon1->SetPosition(160, 275, 22, 22); - RemindIcon1->SetSrc("/user/res/volume_up.bin"); + RemindIcon1->SetPosition(102, 276, 22, 22); + RemindIcon1->SetSrc("/user/res/volume_down.bin"); RemindIcon1->SetVisible(true); } + if (RemindIcon2) + { + RemindIcon2->SetPosition(208, 276, 22, 22); + RemindIcon2->SetSrc("/user/res/volume_up.bin"); + RemindIcon2->SetVisible(true); + } break; } case THUNDERBIRD_BULEVIEW_DISCONNECT_FAILED: @@ -697,13 +703,13 @@ namespace OHOS if (RemindIcon1) { - RemindIcon1->SetPosition(105, 276, 22, 22); + RemindIcon1->SetPosition(102, 276, 22, 22); RemindIcon1->SetSrc("/user/res/volume_down.bin"); RemindIcon1->SetVisible(true); } if (RemindIcon2) { - RemindIcon2->SetPosition(211, 276, 22, 22); + RemindIcon2->SetPosition(208, 276, 22, 22); RemindIcon2->SetSrc("/user/res/volume_up.bin"); RemindIcon2->SetVisible(true); } diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 55e604fc4..a05d0e76b 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -2657,6 +2657,7 @@ extern "C" { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleBluetoothEarphoneConnectStatus: 收到蓝牙耳机连接状态通知,connectStatus=%d", connectStatus); if(ThunderBirdMainView::GetInstance()){ int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView(); //获取当前视图 + ThunderBirdMainView::GetInstance()->GetEarphoneIcon()->SetVisible(connectStatus); // ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_BLUEVIEW, ThunderBirdBlueView::THUNDERBIRD_BULEVIEW_EXIT); } } @@ -2711,7 +2712,8 @@ extern "C" { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "屏保图片存在,直接发送切换屏保通知"); } } - + + //API错误处理 void ThunderBirdModel::HandleApiError(const char* message) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleApiError"); @@ -2720,11 +2722,12 @@ extern "C" { { int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView(); int currentSubView = ThunderBirdMainView::GetInstance()->GetCurrentSubView(); - if(currentSubView == ThunderBirdAdjustView::THUNDERBIRD_ADJUSTVIEW_WARNING && currentSubView == ThunderBirdAdjustView::THUNDERBIRD_ADJUSTVIEW_NETWORK_CONNECTING) + if(currentSubView == ThunderBirdAdjustView::THUNDERBIRD_ADJUSTVIEW_WARNING || currentSubView == ThunderBirdAdjustView::THUNDERBIRD_ADJUSTVIEW_NETWORK_CONNECTING) { ThunderBirdAdjustView::GetInstance()->UpdateTaskReminderText(message); } - else + //处于状态显示界面 + else if(currentView == THUNDERBIRD_DIALOGUEVIEW && currentSubView == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW) { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_ADJUSTVIEW, ThunderBirdAdjustView::THUNDERBIRD_ADJUSTVIEW_WARNING); ThunderBirdAdjustView::GetInstance()->UpdateTaskReminderText(message);