From: luozheng <1732036298@qq.com> Date: Fri, 13 Sep 2024 11:59:41 +0000 (+0800) Subject: #524,解决:录音删除,删除后不是返回到录音列表界面,返回的是录音界面bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e5c3896c141a1b895e4c0c063ee99e2542a87540;p=mirrors%2FFD230.git #524,解决:录音删除,删除后不是返回到录音列表界面,返回的是录音界面bug #658,解决,手表,录音频繁点击会有蓝色效果 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordGoingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordGoingView.cpp index 19fcf2016..0f7ddf896 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordGoingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordGoingView.cpp @@ -228,7 +228,7 @@ namespace OHOS RECORD_GOING_BUTTON->SetViewId(RECORD_GOING_BUTTON_VIEWID); RECORD_GOING_BUTTON->SetStyle(STYLE_BACKGROUND_COLOR, 0xffff5a36); RECORD_GOING_BUTTON->SetStyle(STYLE_BORDER_RADIUS, 20); - RECORD_GOING_BUTTON->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); + RECORD_GOING_BUTTON->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xffff5a36, UIButton::PRESSED); RECORD_GOING_BUTTON->SetStyleForState(STYLE_BORDER_RADIUS, 20, UIButton::PRESSED); UIView::OnClickListener *clickListener = static_cast(RecordingPresenter::GetInstance()); RECORD_GOING_BUTTON->SetOnClickListener(clickListener); 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 10d452c2c..6815da00e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -179,7 +179,7 @@ namespace OHOS 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,line = ", state, __LINE__); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "state %d,line = %d", state, __LINE__); if (state == UICheckBox::UICheckBoxState::UNSELECTED) { p_RecordingPlayerView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED); 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 fffd42ef4..09016c40c 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-06 11:51:33 + * @LastEditTime: 2024-09-13 19:51:27 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp */ @@ -270,7 +270,7 @@ namespace OHOS // uapi_delete_files(fileName.c_str());//删除录音文件 p_RecordingModel->UpdateRecordingInfo(); - p_RecordingView->ChangeView(RECORDINGDELETEVIEW, RECORDINGVIEW); + p_RecordingView->ChangeView(RECORDINGDELETEVIEW, RECORDINGLISTVIEW); return true; } else if (strcmp(view.GetViewId(), RECORD_DELETE_OFF_BUTTON_VIEWID) == 0) @@ -383,6 +383,13 @@ namespace OHOS return false; } p_RecordingView->ChangeView(RECORDINGLISTVIEW, RECORDINGPLAYERVIEW); // 切换到录音播放界面 + RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); + if (p_RecordingPlayerView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingPlayerView GetInstance fail"); + return false; + } + p_RecordingPlayerView->ResetComponentStatus(); /* ------------------------ 播放录音 ------------------------ */ if (p_RecordingModel->RecordingListOnClickPlay() != OHOS_SUCCESS) {