From: xue <2144439972@qq.com> Date: Mon, 29 Sep 2025 02:39:45 +0000 (+0800) Subject: 优化对话 X-Git-Tag: V1.0.9_20251128_194606_LN~290^2 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=fe573bd2de3320c688f487f2819d56d7ca9eefbe;p=mirrors%2FFD230.git 优化对话 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdAdjustView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdAdjustView.cpp index 9f5615f4c..4715b81e2 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdAdjustView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdAdjustView.cpp @@ -165,7 +165,7 @@ namespace OHOS if (RemindLabel) { RemindLabel->SetPosition(132, 284, 96, 28); - RemindLabel->SetText("按 确认"); + RemindLabel->SetText("按 确认"); RemindLabel->SetVisible(true); } if (RemindIcon) @@ -176,7 +176,7 @@ namespace OHOS } if (RemindIcon2) { - RemindIcon2->SetPosition(158, 286, 24, 24); + RemindIcon2->SetPosition(155, 283, 24, 24); RemindIcon2->SetSrc("/user/res/volume_up.bin"); RemindIcon2->SetVisible(true); } diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp index 5cdf7439a..cdc7c2408 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp @@ -214,16 +214,15 @@ namespace OHOS { if (TextLabel) { - TextLabel->SetPosition(111, 64, 180, 42); + TextLabel->SetPosition(0, 64, 360, 42); TextLabel->SetText("发呆中..."); - TextLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_LEFT); + TextLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); TextLabel->SetVisible(true); } if (TextLabel_Y) { - TextLabel_Y->SetPosition(113, 66, 180, 42); + TextLabel_Y->SetPosition(TextLabel->GetX()+2, TextLabel->GetY() + 2, 360, 42); TextLabel_Y->SetText("发呆中..."); - TextLabel_Y->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_LEFT); TextLabel_Y->SetVisible(true); } break; diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp index 4ccec7ed8..36f7a05cb 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdGuideView.cpp @@ -240,7 +240,7 @@ namespace OHOS if (RemindButton) { RemindButton->SetPosition(106, 288, 148, 40); - RemindButton->SetText("按 跳过"); + RemindButton->SetText("按 跳过"); RemindButton->SetLabelPosition(2, 0); RemindButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); RemindButton->SetVisible(true); 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 a75e03336..b1446178c 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 @@ -824,7 +824,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "batteryLabel new fail"); return nullptr; } - batteryLabel->SetPosition(batteryimage->GetX() + 38, (group1->GetHeight() - 14) / 2, 30, 30); + batteryLabel->SetPosition(batteryimage->GetX() + 35, (group1->GetHeight() - 14) / 2, 30, 30); batteryLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 15); batteryLabel->SetText("100"); batteryLabel->SetStyle(STYLE_TEXT_COLOR, Color::White().full); @@ -846,7 +846,6 @@ namespace OHOS group1->Add(chargeBatteryicon); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "chargeBatteryicon add success"); /* -------------------------------------------------------------------------- */ - // ScrollView_->Add(group1); /* -------------------------------------------------------------------------- */ updateSignalDisplay(); /* -------------------------------------------------------------------------- */ @@ -1034,8 +1033,6 @@ namespace OHOS { //首次充电亮屏提醒 uapi_set_screen_on_api(); - // int16_t currentView = GetCurrentView(); - // int16_t currentSubView = GetCurrentSubView(); if (currentView_ == THUNDERBIRD_DIALOGUEVIEW || (currentView_ == THUNDERBIRD_LULLABYVIEW && (currentSubView_ == ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_1 || 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 2ae130783..ccd845230 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 @@ -86,6 +86,8 @@ bind_status = true; } WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "目前绑定状态 %s", temp); + + uapi_setScreenDuration(30000);//自动息屏30秒 } ThunderBirdModel::~ThunderBirdModel() diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index 24f511b4d..87d050269 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -622,10 +622,12 @@ namespace OHOS { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_LISTENING); isDialogueing = true; + ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST);//开始对话 } else { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW); + ln_ws_end_audio_chat();//结束对话 isDialogueing = false; } }