From: luozheng <1732036298@qq.com> Date: Fri, 1 Mar 2024 07:25:35 +0000 (+0800) Subject: 修改录音视图源文件名称 X-Git-Tag: release_V1.2.70_20241020_135402~1274^2~38^2~12 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=30e2ef4418d2507890fdbbe1604dc308c982a5b7;p=mirrors%2FFD230.git 修改录音视图源文件名称 --- diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index 4cd279df3..6057fa583 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -312,10 +312,11 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordGoingView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordListPresenter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordListView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordPlayPresenter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordPlayView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordPresenter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordingPlayerPresenter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordingPlayerView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordingPresenter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordingView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/record/src/RecordingModel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/message/src/MessageAdapter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/message/src/MessageItemView.cpp diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp index 8cb7a33d1..d5cef167b 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp @@ -96,12 +96,12 @@ #include "classicbluetooth/include/ClassicBlueToothPresenter.h" #include "classicbluetooth/include/ClassicBlueToothView.h" -#include "record/include/RecordPresenter.h" -#include "record/include/RecordView.h" +#include "record/include/RecordingPresenter.h" +#include "record/include/RecordingView.h" #include "record/include/RecordListPresenter.h" #include "record/include/RecordListView.h" -#include "record/include/RecordPlayPresenter.h" -#include "record/include/RecordPlayView.h" +#include "record/include/RecordingPlayerPresenter.h" +#include "record/include/RecordingPlayerView.h" #include "record/include/RecordDeletePresenter.h" #include "record/include/RecordDeleteView.h" #include "record/include/RecordGoingPresenter.h" @@ -640,7 +640,7 @@ namespace OHOS void NativeLauncher::InitRecordingSlice(void) // 录音 { - SliceProxy *record = new AbilitySliceProxy; + SliceProxy *record = new AbilitySliceProxy; if (record == nullptr) { return; @@ -660,7 +660,7 @@ namespace OHOS void NativeLauncher::InitRecordingPlaySlice(void) { - SliceProxy *recordplay = new AbilitySliceProxy; + SliceProxy *recordplay = new AbilitySliceProxy; if (recordplay == nullptr) { return; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h new file mode 100644 index 000000000..eed0a7abe --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingModel.h @@ -0,0 +1,71 @@ +#ifndef RECORDING_MODEL_H +#define RECORDING_MODEL_H + +#include "stdio.h" +#include "gfx_utils/list.h" +#include "UiServersMsg.h" +#include "player.h" +#include "source.h" +#include "audio_manager.h" +#include "audio_base_type.h" + +namespace OHOS +{ + using namespace OHOS::Media; + using OHOS::Media::Player; + using OHOS::Media::Source; + +// constexpr int ERR_RET = -1; +// static constexpr int VOLUME_MAXIMUM = 100; +// static constexpr int VOLUME_MINIMUM = 0; +// static constexpr int VOLUME_PER_CHANGE = 10; +// #define BUFFER_SIZE 15 + + // enum PlayerModelState : uint8_t + // { + // LOOP, + // SEQUENCE, + // REPEATS, + // RANDOM, + // }; + + // enum + // { + // NORMAL, + // NONE_SONG_PLAY, + // SONG_ALREADY_PLAY, + // SONG_ALREADY_PAUSE, + // SONG_ALREADY_STOP, + // EXECUTE_FUNC_FAILED, + // NO_SUPPORT_SCENE, + // PLAYER_RESPONESE_MAX + // }; + + // class PlayerInterruptListener; + // typedef struct + // { + // uint16 playerModel; + // uint32 value; + // } PlayersMsg; + + class RecordingModel + { + public: + static RecordingModel *GetInstance(void); + std::string GetRecordingPlayerFilePath(void); + void SetRecordingPlayerFilePath(std::string src); + void SetRecordingPlayButtonState(bool state); + + private: + RecordingModel(); + RecordingModel(const RecordingModel &) = delete; + RecordingModel &operator=(const RecordingModel &) = delete; + virtual ~RecordingModel(); + + private: + std::string FilePath; + bool playButtonState{false}; + }; +} + +#endif diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerPresenter.h similarity index 66% rename from code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayPresenter.h rename to code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerPresenter.h index b19a8a560..2b3593d76 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerPresenter.h @@ -3,26 +3,26 @@ #include "Presenter.h" -#include "RecordPlayView.h" +#include "RecordingPlayerView.h" namespace OHOS { - class RecordPlayView; + class RecordingPlayerView; - class RecordPlayPresenter : public Presenter, + class RecordingPlayerPresenter : public Presenter, public UIView::OnClickListener, public UIView::OnDragListener { public: - RecordPlayPresenter(); - virtual ~RecordPlayPresenter(); + RecordingPlayerPresenter(); + virtual ~RecordingPlayerPresenter(); void OnStart() override; void OnPause() override; void OnResume() override; void OnStop() override; - static RecordPlayPresenter *GetInstance(); + static RecordingPlayerPresenter *GetInstance(); private: //因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayView.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h similarity index 89% rename from code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayView.h rename to code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h index a580dfc24..d59866e8c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPlayView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPlayerView.h @@ -18,14 +18,14 @@ namespace OHOS static const char *RECORD_PLAY_DELETE_BUTTON_VIEWID = "RECORD_PLAY_DELETE_BUTTON"; // 删除按钮的视图id static const char *RECORD_PLAY_VOLUME_BUTTON_VIEWID = "RECORD_PLAY_VOLUME_BUTTON"; // 音量按钮的视图id - class RecordPlayPresenter; - class RecordPlayView : public View + class RecordingPlayerPresenter; + class RecordingPlayerView : public View { public: - RecordPlayView(); - virtual ~RecordPlayView(); - static RecordPlayView *GetInstance(void); + RecordingPlayerView(); + virtual ~RecordingPlayerView(); + static RecordingPlayerView *GetInstance(void); void OnStart() override; void OnSetUpView() override; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPresenter.h similarity index 70% rename from code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPresenter.h rename to code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPresenter.h index a33a43f99..3606de88c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingPresenter.h @@ -3,26 +3,26 @@ #include "Presenter.h" -#include "RecordView.h" +#include "RecordingView.h" namespace OHOS { - class RecordView; + class RecordingView; - class RecordPresenter : public Presenter, + class RecordingPresenter : public Presenter, public UIView::OnClickListener, public UIView::OnDragListener { public: - RecordPresenter(); - virtual ~RecordPresenter(); + RecordingPresenter(); + virtual ~RecordingPresenter(); void OnStart() override; void OnPause() override; void OnResume() override; void OnStop() override; - static RecordPresenter *GetInstance(); + static RecordingPresenter *GetInstance(); private: //因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordView.h b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingView.h similarity index 79% rename from code/sdk/application/wearable/fd230app/nativeui/record/include/RecordView.h rename to code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingView.h index 08cb90be9..1fa12d98d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/record/include/RecordingView.h @@ -14,14 +14,14 @@ namespace OHOS { static const char *RECORD_BUTTON = "RecordButton"; //录音按钮 - class RecordPresenter; - class RecordView : public View + class RecordingPresenter; + class RecordingView : public View { public: - RecordView(); - virtual ~RecordView(); - static RecordView *GetInstance(void); + RecordingView(); + virtual ~RecordingView(); + static RecordingView *GetInstance(void); void OnStart() override; void OnSetUpView() override; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp new file mode 100644 index 000000000..6d762d068 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -0,0 +1,48 @@ +#include "record/include/RecordingModel.h" + +#include "thread_adapter.h" +#include "UiConfig.h" +#include "bts_a2dp_source.h" + +namespace OHOS +{ + + static MutexId g_mutex; + RecordingModel::RecordingModel() + { + g_mutex = MUTEX_InitValue(); + } + + RecordingModel::~RecordingModel() + { + } + + RecordingModel *RecordingModel::GetInstance(void) + { + static RecordingModel instance; + return &instance; + } + + /// @brief 获取录音播放器文件路径 + /// @param void + /// @return 文件路径 + std::string RecordingModel::GetRecordingPlayerFilePath(void) + { + return FilePath; + } + + /// @brief 设置录音播放器文件路径 + /// @param src 文件路径 + void RecordingModel::SetRecordingPlayerFilePath(std::string src) + { + FilePath = src; + } + + /// @brief 设置录音播放按钮状态 + /// @param state true + void RecordingModel::SetRecordingPlayButtonState(bool state) + { + playButtonState = state; + } + +} \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerPresenter.cpp similarity index 65% rename from code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayPresenter.cpp rename to code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerPresenter.cpp index 67a076cce..f0cc86036 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerPresenter.cpp @@ -2,57 +2,57 @@ #include "NativeAbility.h" #include "graphic_math.h" #include "string.h" -#include "record/include/RecordPlayPresenter.h" +#include "record/include/RecordingPlayerPresenter.h" namespace OHOS { // 当前Presenter属性实例化的内存指针 - static RecordPlayPresenter *g_pRecordPlayPresenter = nullptr; + static RecordingPlayerPresenter *g_pRecordPlayPresenter = nullptr; - RecordPlayPresenter::RecordPlayPresenter() + RecordingPlayerPresenter::RecordingPlayerPresenter() { g_pRecordPlayPresenter = this; } - RecordPlayPresenter::~RecordPlayPresenter() + RecordingPlayerPresenter::~RecordingPlayerPresenter() { g_pRecordPlayPresenter = nullptr; } - RecordPlayPresenter *RecordPlayPresenter::GetInstance() + RecordingPlayerPresenter *RecordingPlayerPresenter::GetInstance() { return g_pRecordPlayPresenter; } - void RecordPlayPresenter::OnStart() + void RecordingPlayerPresenter::OnStart() { - Presenter::OnStart(); + Presenter::OnStart(); } - void RecordPlayPresenter::OnPause(void) + void RecordingPlayerPresenter::OnPause(void) { - Presenter::OnPause(); + Presenter::OnPause(); } - void RecordPlayPresenter::OnResume(void) + void RecordingPlayerPresenter::OnResume(void) { - Presenter::OnResume(); + Presenter::OnResume(); } - void RecordPlayPresenter::OnStop(void) + void RecordingPlayerPresenter::OnStop(void) { - Presenter::OnStop(); + Presenter::OnStop(); } - bool RecordPlayPresenter::OnDrag(UIView &view, const DragEvent &event) + bool RecordingPlayerPresenter::OnDrag(UIView &view, const DragEvent &event) { if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && @@ -63,7 +63,7 @@ namespace OHOS } } - bool RecordPlayPresenter::OnClick(UIView &view, const ClickEvent &event) + bool RecordingPlayerPresenter::OnClick(UIView &view, const ClickEvent &event) { // 根据控件id查找是哪个控件触发了点击回调 diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp similarity index 89% rename from code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayView.cpp rename to code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp index 8f086fbd6..298a9d2fe 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPlayView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPlayerView.cpp @@ -1,32 +1,32 @@ -#include "record/include/RecordPlayView.h" -#include "record/include/RecordPlayPresenter.h" +#include "record/include/RecordingPlayerView.h" +#include "record/include/RecordingPlayerPresenter.h" #include "UiConfig.h" namespace OHOS { - static RecordPlayView *g_pRecordPlayView{nullptr}; + static RecordingPlayerView *g_pRecordPlayView{nullptr}; - RecordPlayView::RecordPlayView() + RecordingPlayerView::RecordingPlayerView() { g_pRecordPlayView = this; } - RecordPlayView::~RecordPlayView() + RecordingPlayerView::~RecordingPlayerView() { DeInitView(); g_pRecordPlayView = nullptr; } - RecordPlayView *RecordPlayView::GetInstance() + RecordingPlayerView *RecordingPlayerView::GetInstance() { return g_pRecordPlayView; } // 按钮初始化 - UIButton *RecordPlayView::CreateUIButton(int left, int top, int width, int height, const char *viewId, + UIButton *RecordingPlayerView::CreateUIButton(int left, int top, int width, int height, const char *viewId, const char *defimagesrc, const char *toggleimagesrc, UIView::OnClickListener **buttonClick) { UIButton *button = new UIButton(); @@ -49,19 +49,19 @@ namespace OHOS button->SetStyleForState(STYLE_BORDER_RADIUS, 0, UIButton::PRESSED); // Add the CallBack about events - *buttonClick = static_cast(RecordPlayPresenter::GetInstance()); + *buttonClick = static_cast(RecordingPlayerPresenter::GetInstance()); button->SetOnClickListener(*buttonClick); return button; } - void RecordPlayView::InitView() + void RecordingPlayerView::InitView() { if (container_ == nullptr) { container_ = new UIViewGroup(); container_->SetPosition(0, 0, 466, 466); container_->SetStyle(STYLE_BACKGROUND_OPA, 0); - draglistener = static_cast(RecordPlayPresenter::GetInstance()); + draglistener = static_cast(RecordingPlayerPresenter::GetInstance()); if (draglistener == nullptr) { return; @@ -165,7 +165,7 @@ namespace OHOS RECORD_PLAY_PAUSE_CHECKBOX->SetImages(PNG_UNIVERSAL_PAUSE_IMAGE, PNG_UNIVERSAL_PLAY_IMAGE); // Add the CallBack about events - UIView::OnClickListener *checkBoxClick = static_cast(RecordPlayPresenter::GetInstance()); + UIView::OnClickListener *checkBoxClick = static_cast(RecordingPlayerPresenter::GetInstance()); RECORD_PLAY_PAUSE_CHECKBOX->SetOnClickListener(checkBoxClick); // Add to rootView container_->Add(RECORD_PLAY_PAUSE_CHECKBOX); @@ -209,7 +209,7 @@ namespace OHOS /********************************************************************************************************/ } - void RecordPlayView::DeInitView() + void RecordingPlayerView::DeInitView() { if (container_ != nullptr) { @@ -289,30 +289,30 @@ namespace OHOS container_ = nullptr; } - void RecordPlayView::OnStart() + void RecordingPlayerView::OnStart() { - View::OnStart(); + View::OnStart(); InitView(); RootView::GetInstance()->Add(container_); } - void RecordPlayView::OnSetUpView() + void RecordingPlayerView::OnSetUpView() { - View::OnSetUpView(); + View::OnSetUpView(); Draw(); } - void RecordPlayView::OnTearDownView() + void RecordingPlayerView::OnTearDownView() { - View::OnTearDownView(); + View::OnTearDownView(); return; } - void RecordPlayView::OnStop() + void RecordingPlayerView::OnStop() { - View::OnStop(); + View::OnStop(); RootView::GetInstance()->RemoveAll(); return; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp similarity index 65% rename from code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPresenter.cpp rename to code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp index f84710183..722371ac6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp @@ -2,56 +2,56 @@ #include "NativeAbility.h" #include "graphic_math.h" #include "string.h" -#include "record/include/RecordPresenter.h" +#include "record/include/RecordingPresenter.h" namespace OHOS { // 当前Presenter属性实例化的内存指针 - static RecordPresenter *g_pRecordPresenter = nullptr; + static RecordingPresenter *g_pRecordPresenter = nullptr; - RecordPresenter::RecordPresenter() + RecordingPresenter::RecordingPresenter() { g_pRecordPresenter = this; } - RecordPresenter::~RecordPresenter() + RecordingPresenter::~RecordingPresenter() { g_pRecordPresenter = nullptr; } - RecordPresenter *RecordPresenter::GetInstance() + RecordingPresenter *RecordingPresenter::GetInstance() { return g_pRecordPresenter; } - void RecordPresenter::OnStart() + void RecordingPresenter::OnStart() { - Presenter::OnStart(); + Presenter::OnStart(); } - void RecordPresenter::OnPause(void) + void RecordingPresenter::OnPause(void) { - Presenter::OnPause(); + Presenter::OnPause(); } - void RecordPresenter::OnResume(void) + void RecordingPresenter::OnResume(void) { - Presenter::OnResume(); + Presenter::OnResume(); } - void RecordPresenter::OnStop(void) + void RecordingPresenter::OnStop(void) { - Presenter::OnStop(); + Presenter::OnStop(); } - bool RecordPresenter::OnDrag(UIView &view, const DragEvent &event) + bool RecordingPresenter::OnDrag(UIView &view, const DragEvent &event) { if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && @@ -78,7 +78,7 @@ namespace OHOS }; #endif - bool RecordPresenter::OnClick(UIView &view, const ClickEvent &event) + bool RecordingPresenter::OnClick(UIView &view, const ClickEvent &event) { // 将参数保存到数组中 diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp similarity index 85% rename from code/sdk/application/wearable/fd230app/nativeui/record/src/RecordView.cpp rename to code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp index 3d530727c..e473e26c3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingView.cpp @@ -1,5 +1,5 @@ -#include "record/include/RecordView.h" -#include "record/include/RecordPresenter.h" +#include "record/include/RecordingView.h" +#include "record/include/RecordingPresenter.h" #include "UiConfig.h" namespace OHOS @@ -9,25 +9,25 @@ namespace OHOS {PNG_ANIMATOR2_IMAGE, {213, 400}, 40, 40, IMG_SRC_FILE_PATH}, }; - static RecordView *g_pRecordView{nullptr}; + static RecordingView *g_pRecordView{nullptr}; - RecordView::RecordView() + RecordingView::RecordingView() { g_pRecordView = this; } - RecordView::~RecordView() + RecordingView::~RecordingView() { DeInitView(); g_pRecordView = nullptr; } - RecordView *RecordView::GetInstance() + RecordingView *RecordingView::GetInstance() { return g_pRecordView; } - void RecordView::InitView(void) + void RecordingView::InitView(void) { // Add ScrollView to App if (scrollView == nullptr) @@ -38,7 +38,7 @@ namespace OHOS scrollView->Resize(466, 466); scrollView->SetViewId("ScrollView"); scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); - UIView::OnDragListener *listener = static_cast< UIView::OnDragListener *>(RecordPresenter::GetInstance()); + UIView::OnDragListener *listener = static_cast< UIView::OnDragListener *>(RecordingPresenter::GetInstance()); scrollView->SetOnDragListener(listener); scrollView->SetTouchable(true); scrollView->SetDraggable(true); @@ -97,7 +97,7 @@ namespace OHOS button->SetStyleForState(STYLE_BORDER_RADIUS, 100, UIButton::PRESSED); // Add the CallBack about events - UIView::OnClickListener *buttonClick = static_cast(RecordPresenter::GetInstance()); + UIView::OnClickListener *buttonClick = static_cast(RecordingPresenter::GetInstance()); button->SetOnClickListener(buttonClick); // Add to scrollView1 scrollView->Add(button); @@ -146,7 +146,7 @@ namespace OHOS scrollView->Add(imageAnimator1_); imageAnimator1_->SetVisible(true); } - void RecordView::DeInitView(void) + void RecordingView::DeInitView(void) { if (scrollView != nullptr) { @@ -181,30 +181,30 @@ namespace OHOS delete scrollView; scrollView = nullptr; } - void RecordView::OnStart() + void RecordingView::OnStart() { - View::OnStart(); + View::OnStart(); InitView(); } - void RecordView::OnSetUpView() + void RecordingView::OnSetUpView() { - View::OnSetUpView(); + View::OnSetUpView(); RootView::GetInstance()->Add(scrollView); Draw(); } - void RecordView::OnTearDownView() + void RecordingView::OnTearDownView() { - View::OnTearDownView(); + View::OnTearDownView(); return; } - void RecordView::OnStop() + void RecordingView::OnStop() { - View::OnStop(); + View::OnStop(); RootView::GetInstance()->RemoveAll(); return; }