From: xue <2144439972@qq.com> Date: Tue, 28 Oct 2025 10:00:16 +0000 (+0800) Subject: 修改引导界面 X-Git-Tag: V1.0.9_20251128_194606_LN~161 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=7f6143d02a4a5b5ae69247d3a89333bb22908ead;p=mirrors%2FFD230.git 修改引导界面 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdGuideView.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdGuideView.h index b809a4374..855a97e93 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdGuideView.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdGuideView.h @@ -26,6 +26,8 @@ namespace OHOS THUNDERBIRD_GUIDEVIEW_1 = 0, THUNDERBIRD_GUIDEVIEW_2, THUNDERBIRD_GUIDEVIEW_3, + THUNDERBIRD_GUIDEVIEW_4, + THUNDERBIRD_GUIDEVIEW_5, }; private: 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 885dc07ae..78ccfa46c 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 @@ -1,6 +1,8 @@ #include "thunderbird/include/ThunderBirdGuideView.h" #include "thunderbird/include/ThunderBirdMainView.h" #include "wearable_log.h" +#include "ln_api.h" +#include "player_sample_wrapper.h" namespace OHOS { @@ -120,7 +122,7 @@ namespace OHOS if (RemindIcon) { RemindIcon->SetAutoEnable(false); - RemindIcon->SetPosition(280, 320, 30, 30); + RemindIcon->SetPosition(280, 321, 30, 30); RemindIcon->SetResizeMode(UIImageView::CONTAIN); RemindIcon->SetVisible(false); group->Add(RemindIcon); @@ -187,17 +189,17 @@ namespace OHOS { if (TextLabel) { - TextLabel->SetPosition(35, 64, 325, 42); - TextLabel->SetText("我可以和你聊天,哄你睡觉"); - TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); + TextLabel->SetPosition(35, 64, 300, 42); + TextLabel->SetText("谢谢你选择我来陪伴你。"); + TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); TextLabel->SetRollSpeed(35); TextLabel->SetVisible(true); } if (TextLabel_Y) { - TextLabel_Y->SetPosition(37, 66, 325, 42); - TextLabel_Y->SetText("我可以和你聊天,哄你睡觉"); - TextLabel_Y->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); + TextLabel_Y->SetPosition(37, 66, 300, 42); + TextLabel_Y->SetText("谢谢你选择我来陪伴你。"); + TextLabel_Y->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); TextLabel_Y->SetRollSpeed(35); TextLabel_Y->SetVisible(true); } @@ -218,12 +220,87 @@ namespace OHOS break; } case THUNDERBIRD_GUIDEVIEW_3: + { + if (TextLabel) + { + TextLabel->SetPosition(35, 64, 300, 42); + TextLabel->SetText("我可以和你聊天,哄你睡觉"); + TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); + TextLabel->SetRollSpeed(35); + TextLabel->SetVisible(true); + } + if (TextLabel_Y) + { + TextLabel_Y->SetPosition(37, 66, 300, 42); + TextLabel_Y->SetText("我可以和你聊天,哄你睡觉"); + TextLabel_Y->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); + TextLabel_Y->SetRollSpeed(35); + TextLabel_Y->SetVisible(true); + } + if (RemindButton) + { + RemindButton->SetPosition(106, 114, 148, 40); + RemindButton->SetText("按 下一页"); + RemindButton->SetLabelPosition(2, 0); + RemindButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); + RemindButton->SetVisible(true); + } + if(RemindIcon) + { + RemindIcon->SetPosition(152, 122, 24, 24); + RemindIcon->SetSrc("/user/res/volume_up.bin"); + RemindIcon->SetVisible(true); + } + break; + } + case THUNDERBIRD_GUIDEVIEW_4: + { + if (TextLabel) + { + TextLabel->SetPosition(35, 64, 300, 42); + TextLabel->SetText("你可以把心事交给我~"); + TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); + TextLabel->SetRollSpeed(35); + TextLabel->SetVisible(true); + } + if (TextLabel_Y) + { + TextLabel_Y->SetPosition(37, 66, 300, 42); + TextLabel_Y->SetText("你可以把心事交给我~"); + TextLabel_Y->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION); + TextLabel_Y->SetRollSpeed(35); + TextLabel_Y->SetVisible(true); + } + if (RemindButton) + { + RemindButton->SetPosition(106, 114, 148, 40); + RemindButton->SetText("按 下一页"); + RemindButton->SetLabelPosition(2, 0); + RemindButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); + RemindButton->SetVisible(true); + } + if(RemindIcon) + { + RemindIcon->SetPosition(152, 122, 24, 24); + RemindIcon->SetSrc("/user/res/volume_up.bin"); + RemindIcon->SetVisible(true); + } + break; + } + case THUNDERBIRD_GUIDEVIEW_5: { ThunderBirdMainView::GetInstance()->OpenBackGround(); + + // 播放音频文件 - 使用PlayerSample直接调用 + // const char* argv[] = {"xx", "/user/res/music/sxh.mp3", "1", "0"}; + // int32_t argc = 4; + // PlayerSample(argc, argv); + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "进入THUNDERBIRD_GUIDEVIEW_3,播放音频: %s", argv[1]); + if (TextLabel) { - TextLabel->SetPosition(60, 68, 250, 84); - TextLabel->SetText("换角色、挑声音、\n哄睡...扫码尽享!"); + TextLabel->SetPosition(35, 68, 300, 84); + TextLabel->SetText("换角色,挑声音,哄睡...\nAmby小程序扫码尽享"); TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);//自动换行 TextLabel->SetVisible(true); }