From 80b28f29e5ad2e89e0101220fa39aa48a4e3bb23 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 6 Sep 2024 14:28:54 +0800 Subject: [PATCH] =?utf8?q?#528,=E8=A7=A3=E5=86=B3=EF=BC=9A=E5=BD=95?= =?utf8?q?=E9=9F=B3=E6=92=AD=E6=94=BE=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=92=AD?= =?utf8?q?=E6=94=BE=E6=8C=89=E9=94=AE=E5=91=A8=E8=BE=B9=E6=9C=89=E5=9C=88?= =?utf8?q?=E8=BE=B9=EF=BC=8C=E4=B8=8D=E7=BE=8E=E8=A7=82=EF=BC=8C=E9=9C=80?= =?utf8?q?=E8=A6=81=E4=BC=98=E5=8C=96bug=20#527,=E8=A7=A3=E5=86=B3?= =?utf8?q?=EF=BC=9A=E5=BD=95=E9=9F=B3=E6=92=AD=E6=94=BE-=E5=9C=A8=E6=92=AD?= =?utf8?q?=E6=94=BE=E5=AE=8C=E5=90=8E=EF=BC=8C=E5=86=8D=E6=AC=A1=E7=82=B9?= =?utf8?q?=E5=87=BB=E6=92=AD=E6=94=BE=E6=8C=89=E9=92=AE=E9=9C=80=E8=A6=81?= =?utf8?q?=E7=82=B9=E5=87=BB=E5=A5=BD=E5=87=A0=E4=B8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/record/include/RecordingModel.h | 1 + .../record/include/RecordingPlayerView.h | 47 ++++----- .../nativeui/record/src/RecordingModel.cpp | 46 +++++++-- .../record/src/RecordingPlayerView.cpp | 95 ++++++++----------- .../record/src/RecordingPresenter.cpp | 9 +- .../nativeui/record/src/RecordingView.cpp | 2 - .../fs/user/res/record/RECORD_PROGRESS_BG.bin | 3 + 7 files changed, 110 insertions(+), 93 deletions(-) create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/record/RECORD_PROGRESS_BG.bin diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h index 7494f1826..7c21eda3d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h @@ -62,6 +62,7 @@ namespace OHOS int RecordingPlayerStat(void); int GetRecordingPlayerState(void); int RecordingPlayerStop(void); + int RecordingPlayerReset(void); void PreviousPlayout(void); void NextPlayout(void); void ClearRecordingPlayer(void); diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h index bd2478c04..2c0450cac 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-08-05 15:20:03 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-27 19:38:39 + * @LastEditTime: 2024-09-06 10:20:35 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h */ #ifndef RECORD_PLAY_VIEW_H @@ -16,20 +16,20 @@ #include "components/ui_circle_progress.h" #include "components/ui_checkbox.h" #include "components/ui_label_ext.h" -#include"ui_resource_string.h" +#include "ui_resource_string.h" #include "components/ui_button.h" #define APP_RES_PATH "/user/res" namespace OHOS { - - static constexpr const char *PNG_UNIVERSAL_PAUSE_IMAGE = APP_RES_PATH "/record/UNIVERSAL_PAUSE.bin"; // 暂停 - static constexpr const char *PNG_UNIVERSAL_PLAY_IMAGE = APP_RES_PATH "/record/UNIVERSAL_PLAY.bin"; // 播放 - static constexpr const char *PNG_RECORD_PLAY_BACKGROUND_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_BACKGROUND.bin"; // 背景 - static constexpr const char *PNG_RECORD_PLAY_PROVE_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_PROVE.bin"; // 上一首 - static constexpr const char *PNG_RECORD_PLAY_NEXT_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_NEXT.bin"; // 下一首 - static constexpr const char *PNG_RECORD_PLAY_DELETE_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_DELETE.bin"; // 删除 - static constexpr const char *PNG_RECORD_PLAY_VOLUME_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_VOLUME.bin"; // 音量 + static constexpr const char *PNG_UNIVERSAL_PAUSE_IMAGE = APP_RES_PATH "/record/UNIVERSAL_PAUSE.bin"; // 暂停 + static constexpr const char *PNG_UNIVERSAL_PLAY_IMAGE = APP_RES_PATH "/record/UNIVERSAL_PLAY.bin"; // 播放 + static constexpr const char *PNG_RECORD_PLAY_BACKGROUND_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_BACKGROUND.bin"; // 背景 + static constexpr const char *PNG_RECORD_PLAY_PROGRESS_BG_IMAGE = APP_RES_PATH "/record/RECORD_PROGRESS_BG.bin"; // 进度条背景 + static constexpr const char *PNG_RECORD_PLAY_PROVE_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_PROVE.bin"; // 上一首 + static constexpr const char *PNG_RECORD_PLAY_NEXT_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_NEXT.bin"; // 下一首 + static constexpr const char *PNG_RECORD_PLAY_DELETE_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_DELETE.bin"; // 删除 + static constexpr const char *PNG_RECORD_PLAY_VOLUME_IMAGE = APP_RES_PATH "/record/RECORD_PLAY_VOLUME.bin"; // 音量 class RecordingPlayerView { @@ -60,20 +60,22 @@ namespace OHOS static RecordingPlayerView *GetInstance(void); UIScrollView *RecordingPlayerViewInit(void); void ClearAll(void); - UILabelExt * GetRecordingFileNameLabel(void); + UILabelExt *GetRecordingFileNameLabel(void); UILabelExt *GetRecordingTimeAndDurationLabel(void); - UICheckBox * GetPlayerButton(void); + UICheckBox *GetPlayerButton(void); void SetPlayerButtonState(UICheckBox::UICheckBoxState state); UICheckBox::UICheckBoxState GetPlayerButtonState(void); void ResetComponentStatus(void); - UICircleProgress * GetPlayerProgressBar(void); + UICircleProgress *GetPlayerProgressBar(void); void SetPlayerProgressBarValue(int value); + private: UILabelExt *SetUpLabel(LabelConfig &labelconfig); // 设置标签 UIButton *SetTheButton(ButtonConfig &buttonconfig, UIView::OnClickListener *clickListener); bool SetUpScrollView(void); bool SetUpRecordingPlayerViewLabel(void); bool SetUpBackGround(void); + bool SetUpPlayerProgressBarBackGroud(); bool SetUpPlayerProgressBar(void); bool SetUpPlayPauseButton(void); bool SetUpProveButton(void); @@ -81,15 +83,16 @@ namespace OHOS bool SetUpDeleteButton(void); bool SetUpVolumeButton(void); UIScrollView *RecordingPlayerViewScrollView{nullptr}; - UIImageView *RecordingPlayBackground{nullptr}; // 录音播放视图背景图片 - UILabelExt *RecordingFileName{nullptr}; // 录音文件名 - UILabelExt *RecordingTimeAndDuration{nullptr}; // 录音时间和时长 - UICircleProgress *PlayerProgressBar{nullptr}; // 录音播放进度条 - UICheckBox *RecordingPlayPauseButton{nullptr}; // 录音播放或暂停按钮 - UIButton *RecordingPlayProveButton{nullptr}; // 上一首按钮 - UIButton *RecordingPlayNextButton{nullptr}; // 下一首按钮 - UIButton *RecordingPlayDeleteButton{nullptr}; // 删除按钮 - UIButton *RecordingPlayVolumeButton{nullptr}; // 音量按钮 + UIImageView *RecordingPlayBackground{nullptr}; // 录音播放视图背景图片 + UILabelExt *RecordingFileName{nullptr}; // 录音文件名 + UILabelExt *RecordingTimeAndDuration{nullptr}; // 录音时间和时长 + UIImageView *PlayerProgressBarBackGround{nullptr}; // 录音播放进度条背景 + UICircleProgress *PlayerProgressBar{nullptr}; // 录音播放进度条 + UICheckBox *RecordingPlayPauseButton{nullptr}; // 录音播放或暂停按钮 + UIButton *RecordingPlayProveButton{nullptr}; // 上一首按钮 + UIButton *RecordingPlayNextButton{nullptr}; // 下一首按钮 + UIButton *RecordingPlayDeleteButton{nullptr}; // 删除按钮 + UIButton *RecordingPlayVolumeButton{nullptr}; // 音量按钮 UIView::OnClickListener *buttonClick{nullptr}; bool initViewStatus{false}; }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp index 54beb2ecd..0b20b837c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -176,10 +176,10 @@ namespace OHOS return OHOS_FAILURE; } SetRecordingPlayerUri(directory + GetCurrentPlayRecordingName() + ".mp3"); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uri: %s.", GetRecordingPlayerUri().c_str()); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uri: %s,line = %d", GetRecordingPlayerUri().c_str(), __LINE__); state = p_RecordingPlayerView->GetPlayerButtonState(); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "state %d", state); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "state %d,line = ", state, __LINE__); if (state == UICheckBox::UICheckBoxState::UNSELECTED) { p_RecordingPlayerView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED); @@ -213,6 +213,14 @@ namespace OHOS // 录音播放 int RecordingModel::RecordingPlayerStat() { + /* ------------------------------ 每次新的播放进度都设为0 ------------------------------ */ + SetCircleProgress(0); // 0:进度100% + RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); + if(p_RecordingPlayerView !=nullptr) + { + p_RecordingPlayerView->SetPlayerProgressBarValue(CircleProgress); + } + /* -------------------------------------------------------------------------- */ int32_t ret; // 设置回调函数 @@ -241,7 +249,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "session invalid"); return OHOS_FAILURE; } - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MakeSessionId %d", SessionId); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MakeSessionId %d", SessionId); p_RecordingPlayerInterruptListener = std::make_shared(); if (p_RecordingPlayerInterruptListener.get() == nullptr) { @@ -265,17 +273,17 @@ namespace OHOS { PlayerCtr->Stop(); // 暂停 PlayerCtr->Reset(); // 初始化 - RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); + // RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); if (p_RecordingPlayerView != nullptr) { p_RecordingPlayerView->SetPlayerButtonState(UICheckBox::UNSELECTED); - SetCircleProgress(100); // 100:进度100% + SetCircleProgress(0); // 0:进度0% p_RecordingPlayerView->SetPlayerProgressBarValue(CircleProgress); } else { SetRecordingPlayButtonState(false); - SetCircleProgress(100); // 100:进度100% + SetCircleProgress(0); // 0:进度0% } AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt); IsActivateAudioInterrupt = false; @@ -359,6 +367,24 @@ namespace OHOS return OHOS_SUCCESS; } + int RecordingModel::RecordingPlayerReset(void) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingModel::RecordingPlayerReset"); + int ret = PlayerCtr->Stop(); + if (ret != 0) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Stop err, ret:%d", ret); + return OHOS_FAILURE; + } + ret = PlayerCtr->Reset(); + if (ret != 0) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Reset err, ret:%d", ret); + return OHOS_FAILURE; + } + return OHOS_SUCCESS; + } + /* * @brief 上一首录音播放 */ @@ -377,7 +403,7 @@ namespace OHOS return; } - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout before index %d,%s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout before index %d,filename %s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); if ((index > num - 1) || (index < 0)) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "currentIndex err"); @@ -385,7 +411,7 @@ namespace OHOS return; } SetClickRecordingIndex(--index < 0 ? num - 1 : index); // 如果从第一首录音设置上一首,那就跳到最后一首 - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout after index %d,%s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout after index %d,filename %s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); SetRecordingPlayerUri(directory + GetCurrentPlayRecordingName() + ".mp3"); SetCircleProgress(0); int32_t ret; @@ -437,7 +463,7 @@ namespace OHOS return; } - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout before index %d,%s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout before index %d,filename %s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); if ((index > num - 1) || (index < 0)) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "currentIndex err"); @@ -445,7 +471,7 @@ namespace OHOS return; } SetClickRecordingIndex(++index > num - 1 ? 0 : index); // 如果从最后一首录音设置下一首,那就跳到第一首 - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout after index %d,%s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NextPlayout after index %d,filename %s", GetClickRecordingIndex(), GetCurrentPlayRecordingName().c_str()); SetRecordingPlayerUri(directory + GetCurrentPlayRecordingName() + ".mp3"); SetCircleProgress(0); int32_t ret; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp index dce388fab..134807072 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp @@ -42,6 +42,9 @@ namespace OHOS delete RecordingTimeAndDuration; RecordingTimeAndDuration = nullptr; + delete PlayerProgressBarBackGround; + PlayerProgressBarBackGround = nullptr; + delete PlayerProgressBar; PlayerProgressBar = nullptr; @@ -178,6 +181,21 @@ namespace OHOS return true; } + // 播放进度条背景设置 + bool RecordingPlayerView::SetUpPlayerProgressBarBackGroud() + { + PlayerProgressBarBackGround = new UIImageView(); + if (PlayerProgressBarBackGround == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingPlayerView::PlayerProgressBarBackGround is new fail!"); + return false; + } + PlayerProgressBarBackGround->SetPosition(173, 173, 120, 120); + PlayerProgressBarBackGround->SetSrc(PNG_RECORD_PLAY_PROGRESS_BG_IMAGE); + PlayerProgressBarBackGround->SetStyle(STYLE_BORDER_RADIUS, 200); + return true; + } + /* * @brief 播放进度条设置 */ @@ -191,13 +209,18 @@ namespace OHOS } PlayerProgressBar->SetPosition(168, 168, 130, 130); PlayerProgressBar->SetViewId(RECORD_PLAY_PLAYERPROGRESSBAR); - PlayerProgressBar->SetStyle(STYLE_BACKGROUND_OPA, 0x2b); + PlayerProgressBar->SetStyle(STYLE_BACKGROUND_OPA, 0x00); PlayerProgressBar->SetStyle(STYLE_BORDER_RADIUS, 100); PlayerProgressBar->SetForegroundStyle(STYLE_BORDER_COLOR, 0xff000000); PlayerProgressBar->SetForegroundStyle(STYLE_LINE_COLOR, 0xffffffff); PlayerProgressBar->SetForegroundStyle(STYLE_LINE_WIDTH, 6); + PlayerProgressBar->SetBackgroundStyle(STYLE_BACKGROUND_COLOR, 0xff000000); + PlayerProgressBar->SetBackgroundStyle(STYLE_LINE_OPA, 0x00); + PlayerProgressBar->SetBackgroundStyle(STYLE_LINE_WIDTH, 0); + // PlayerProgressBar->SetCapType(CAP_ROUND); PlayerProgressBar->SetCenterPosition(65, 65); PlayerProgressBar->SetRadius(65); + PlayerProgressBar->SetStartAngle(0); PlayerProgressBar->SetEndAngle(360); PlayerProgressBar->SetValue(0); @@ -396,75 +419,33 @@ namespace OHOS if (PlayerProgressBar != nullptr) { PlayerProgressBar->SetValue(0); // 0:进度0% - PlayerProgressBar->Invalidate(); } if (RecordingFileName != nullptr) { std::string name = p_RecordingModel->GetCurrentPlayRecordingName(); RecordingFileName->SetText(p_RecordingModel->GetCurrentPlayRecordingName(name).c_str()); - RecordingFileName->Invalidate(); } if (RecordingTimeAndDuration != nullptr) { RecordingTimeAndDuration->SetText(RecordingModel::GetInstance()->Getyyyymmhhh_dateAndTotalRecordDuration().c_str()); - RecordingTimeAndDuration->Invalidate(); - } - if (GetPlayerButton() != nullptr) - { - RecordingModel *p_RecordingModel = RecordingModel::GetInstance(); - int32_t playerState = p_RecordingModel->GetRecordingPlayerState(); - if (playerState != PlayerStates::PLAYER_STARTED) - { - SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED); - } } + RecordingPlayerViewScrollView->Invalidate(); + // if (GetPlayerButton() != nullptr) + // { + // RecordingModel *p_RecordingModel = RecordingModel::GetInstance(); + // int32_t playerState = p_RecordingModel->GetRecordingPlayerState(); + // if (playerState != PlayerStates::PLAYER_STARTED) + // { + // SetPlayerButtonState(UICheckBox::UICheckBoxState::UNSELECTED); + // } + // } } UIScrollView *RecordingPlayerView::RecordingPlayerViewInit() { - if (!SetUpScrollView()) - { - return nullptr; - } - - if (!SetUpRecordingPlayerViewLabel()) - { - return nullptr; - } - - if (!SetUpBackGround()) - { - return nullptr; - } - - if (!SetUpPlayerProgressBar()) - { - return nullptr; - } - buttonClick = static_cast(new RecordingPlayerViewOnClickListener()); - - if (!SetUpPlayPauseButton()) - { - return nullptr; - } - - if (!SetUpProveButton()) - { - return nullptr; - } - - if (!SetUpNextButton()) - { - return nullptr; - } - - if (!SetUpDeleteButton()) - { - return nullptr; - } - - if (!SetUpVolumeButton()) + if (!SetUpScrollView() || !SetUpRecordingPlayerViewLabel() || !SetUpBackGround() || !SetUpPlayerProgressBarBackGroud() || !SetUpPlayerProgressBar() || + !SetUpPlayPauseButton() || !SetUpProveButton() || !SetUpNextButton() || !SetUpDeleteButton() || !SetUpVolumeButton()) { return nullptr; } @@ -472,12 +453,16 @@ namespace OHOS RecordingPlayerViewScrollView->Add(RecordingPlayBackground); RecordingPlayerViewScrollView->Add(RecordingFileName); RecordingPlayerViewScrollView->Add(RecordingTimeAndDuration); + RecordingPlayerViewScrollView->Add(PlayerProgressBarBackGround); RecordingPlayerViewScrollView->Add(PlayerProgressBar); RecordingPlayerViewScrollView->Add(RecordingPlayPauseButton); RecordingPlayerViewScrollView->Add(RecordingPlayProveButton); RecordingPlayerViewScrollView->Add(RecordingPlayNextButton); RecordingPlayerViewScrollView->Add(RecordingPlayDeleteButton); RecordingPlayerViewScrollView->Add(RecordingPlayVolumeButton); + /* -------------------------------------------------------------------------- */ + ResetComponentStatus(); // 设置“录音播放器”【录音文件名标签】的"文本内容"为被点击的"录音"的录音名 + /* -------------------------------------------------------------------------- */ initViewStatus = true; return RecordingPlayerViewScrollView; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp index 86e63f7e6..fffd42ef4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 09:14:38 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-02 09:47:40 + * @LastEditTime: 2024-09-06 11:51:33 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp */ @@ -423,7 +423,7 @@ namespace OHOS void RecordingPlayerViewOnClickListener::PlayerButtonOnClick(void) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingPlayerViewOnClickListener PlayerButtonOnClick"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RecordingPlayerViewOnClickListener PlayerButtonOnClick,%d",__LINE__); RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); if (p_RecordingPlayerView == nullptr) @@ -831,8 +831,9 @@ namespace OHOS p_RecordingPlayerView->GetPlayerProgressBar()->Invalidate(); } } - // GraphicService::GetInstance()->PostGraphicEvent( - // std::bind(&OHOS::RecordingModel::ClearActivateAudioInterrupt, OHOS::RecordingModel::GetInstance())); + usleep(20000); + GraphicService::GetInstance()->PostGraphicEvent( + std::bind(&OHOS::RecordingModel::RecordingPlayerReset, OHOS::RecordingModel::GetInstance())); } void RecordingPlayerCallbackImpl::OnError(int32_t errorType, int32_t errorCode) diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp index 3180e9cc9..af9d7d29a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp @@ -201,8 +201,6 @@ namespace OHOS RecordingViewScrollView[thisView] = p_RecordingPlayerView->RecordingPlayerViewInit(); container_->Add(RecordingViewScrollView[thisView]); } - // 设置“录音播放器”【录音文件名标签】的"文本内容"为被点击的"录音"的录音名 - p_RecordingPlayerView->ResetComponentStatus(); return true; } diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/record/RECORD_PROGRESS_BG.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/record/RECORD_PROGRESS_BG.bin new file mode 100644 index 000000000..121d47321 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/record/RECORD_PROGRESS_BG.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afd1d9278cff32b41c3087f6ea4e253c7a8ccf306c38b3b6d209273849d2153a +size 9624 -- 2.17.1