From: xue <2144439972@qq.com> Date: Tue, 2 Dec 2025 03:43:47 +0000 (+0800) Subject: 修改收音指示灯 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0735a453fff4150a3aacb48c27992e4b9db79877;p=mirrors%2FFD230.git 修改收音指示灯 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h index 58da7efed..1daa8d89c 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h @@ -146,13 +146,14 @@ namespace OHOS THUNDERBIRD_DIALOGUEVIEW_LISTENING, // 聆听中 THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW, // 状态展示 }; + UIImageView *listenIcon{nullptr}; private: UIViewGroup *group{nullptr}; UILabelExtWithShadow *TextLabel{nullptr}; UIImageAnimatorView *speakAnimator{nullptr}; UIImageAnimatorView *listenAnimator{nullptr}; - UIImageView *listenIcon{nullptr}; + ImageAnimatorInfo speakImageInfo[TB_SPEAK_ANIM_FRAMES]; ImageAnimatorInfo listenImageInfo[TB_LISTEN_ANIM_FRAMES]; const char **speakPathsArray{nullptr}; 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 84828dec9..dfdff54ec 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 @@ -196,7 +196,7 @@ namespace OHOS if(ThunderBirdModel::GetInstance()->IsTextEmpty() == true) { - UpdateDialogueText("思考中... "); + UpdateDialogueText("..."); } else { @@ -220,7 +220,7 @@ namespace OHOS //动效图标 if (listenAnimator) { listenAnimator->SetVisible(true); listenAnimator->Start(); } - if (listenIcon) { listenIcon->SetVisible(true); } + if (listenIcon) { listenIcon->SetVisible(false); } // // 启动30秒超时定时器 // if (ThunderBirdModel::GetInstance()) { // ThunderBirdModel::GetInstance()->StartCountUpTimer(8); // 6秒超时 @@ -262,7 +262,8 @@ namespace OHOS void ThunderBirdDialogueView::AudioPlaybackEnd() { if(!TextLabel) return; - TextLabel->SetText("还有什么想聊的吗?"); + // 去除"还有什么想聊的吗?"文本显示 + // TextLabel->SetText("还有什么想聊的吗?"); if(speakAnimator) {speakAnimator->Stop();} } @@ -287,13 +288,14 @@ namespace OHOS void ThunderBirdDialogueView::dialogue_first() { DialogueFirst = false; - if (TextLabel) - { - TextLabel->SetPosition(111, 64, 180, 42); - TextLabel->SetText("进入对话模式"); - TextLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_LEFT); - TextLabel->SetVisible(true); - } + // 去除"进入对话模式"文本显示 + // if (TextLabel) + // { + // TextLabel->SetPosition(111, 64, 180, 42); + // TextLabel->SetText("进入对话模式"); + // TextLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_LEFT); + // TextLabel->SetVisible(true); + // } //动效图标 if (listenAnimator) { listenAnimator->SetVisible(true); listenAnimator->Stop(); } if (listenIcon) { listenIcon->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 726ed6be3..db36ad423 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 @@ -3063,6 +3063,7 @@ extern "C" { || ThunderBirdDialogueView::GetInstance()->DialogueFirst == false) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "录音开始,跳转到聆听状态"); view->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_LISTENING); + ThunderBirdDialogueView::GetInstance()->listenIcon->SetVisible(true); ThunderBirdDialogueView::GetInstance()->IsNormalEnd = false; // ThunderBirdDialogueView::GetInstance()->UpdateDialogueText("超认真聆听中"); } @@ -3094,6 +3095,7 @@ extern "C" { currentSubView == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_LISTENING) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "录音结束,跳转到播放界面"); view->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); + ThunderBirdDialogueView::GetInstance()->listenIcon->SetVisible(false); } else if (currentView == THUNDERBIRD_LULLABYVIEW && currentSubView == ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_3 ||