修改收音指示灯
authorxue <2144439972@qq.com>
Tue, 2 Dec 2025 03:43:47 +0000 (11:43 +0800)
committerxue <2144439972@qq.com>
Tue, 2 Dec 2025 03:43:47 +0000 (11:43 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdDialogueView.h
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp

index 58da7ef..1daa8d8 100644 (file)
@@ -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};
index 84828de..dfdff54 100644 (file)
@@ -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); }
index 726ed6b..db36ad4 100644 (file)
@@ -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 ||