From d5c3ab2dec0c89ef797c8b637588562efefff128 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Tue, 6 Aug 2024 16:33:54 +0800 Subject: [PATCH] =?utf8?q?=E9=9F=B3=E4=B9=90=E7=9B=B8=E5=85=B3=E6=96=87?= =?utf8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=96=B0?= =?utf8?q?=E7=9A=84ICON=E5=9B=BE=E7=89=87=EF=BC=8C=E5=88=A0=E9=99=A4?= =?utf8?q?=E9=83=A8=E5=88=86=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/fd230app/CMakeLists.txt | 1 - .../nativelauncher/include/UiConfig.h | 1 + .../include/ui_resource_image.h | 56 +++++++++++-------- .../nativeui/applist/src/ApplistModel.cpp | 1 + .../nativeui/main/include/MainViewSample.h | 2 +- .../main/include/VolumeSettingPresenter.h | 10 ++-- .../nativeui/main/include/VolumeSettingView.h | 10 ++-- .../include/MusicPlayerControlView.h | 22 -------- .../musicplayer/include/MusicPlayerView.h | 4 +- .../src/MusicPlayerControlView.cpp | 30 ---------- .../musicplayer/src/MusicPlayerView.cpp | 13 +---- .../nativeui/player/include/PlayersView.h | 2 +- .../nativeui/player/src/BluetoothView.cpp | 4 +- .../player/src/PlayerListitemView.cpp | 4 +- .../player/src/PlayersCaseListAdapter.cpp | 12 ++-- .../nativeui/player/src/PlayersModel.cpp | 4 +- .../nativeui/player/src/PlayersPresenter.cpp | 8 +-- .../nativeui/player/src/PlayersView.cpp | 26 ++++----- .../screensetting/src/ScreenModels.cpp | 17 ++---- 19 files changed, 82 insertions(+), 145 deletions(-) delete mode 100644 code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h delete mode 100644 code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index a09ea586a..a0271c33f 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -421,7 +421,6 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aimodels/src/AiModelsPresenter.cpp #音乐播放器 - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerControlView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerModel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerPresenter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerView.cpp diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h index 8cfabc49f..612292144 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h @@ -312,6 +312,7 @@ namespace OHOS static constexpr const char *PNG_APPLIST_AIVOICE_IMAGE = APP_LIST_PATH "/aivoice.bin"; // AI Voice(人工智能语音) static constexpr const char *PNG_APPLIST_SLEEP_IMAGE = APP_LIST_PATH "/sleeping.bin"; // 睡眠 static constexpr const char *PNG_APPLIST_INFORMATION_IMAGE = APP_LIST_PATH "/information.bin"; // 计算器 + static constexpr const char *PNG_APPLIST_MUSIC_IMAGE = APP_LIST_PATH "/music.bin"; // 音乐 // AppList hexagon icon static constexpr const char *PNG_APPLIST_DEFAULT_IMG = APP_RES_PATH "/regular_hexagon.bin"; diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h index c19b9b08a..bc18a57ca 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-16 14:43:44 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-26 14:53:43 + * @LastEditTime: 2024-08-06 16:03:11 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h */ #ifndef UI_RESOURCE_IMAGE_H @@ -18,29 +18,37 @@ namespace OHOS static const int HEART_HEARTRATE_TOP = 0x100003; /* -------------------------------------------------------------------------- */ static const int PLAYER_BACKGROUND = 0x200001; // 音乐背景 - static const int PLAYER_DECREASE_BUTTON = 0x200002; // 点击后声音减少 - static const int PLAYER_EARPHONE = 0x200003; // 大的蓝牙耳机的icon - static const int PLAYER_EARPHONE_COLOR = 0x200004; // 蓝牙耳机模式绿色图片 - static const int PLAYER_EARPHONE_WHITE = 0x200005; // 蓝牙耳机模式白色图片 - static const int PLAYER_ELLIPSE = 0x200006; // 椭圆 - static const int PLAYER_INCREASE_BUTTON = 0x200007; // 点击后声音加 - static const int PLAYER_LOCAL_MUSIC_COLOR = 0x200008; // 本地音乐模式绿色图片,默认本地模式 - static const int PLAYER_LOCAL_MUSIC_WHITE = 0x200009; // 本地音乐模式白色图片 - static const int PLAYER_MUSIC_DELETE = 0x20000a; // 删除音乐 - static const int PLAYER_MUSIC_LIST = 0x20000b; // 音乐列表 - static const int PLAYER_MUSIC_NEXT = 0x20000c; // 下一首音乐 - static const int PLAYER_MUSIC_PROVE = 0x20000d; // 上一首音乐 - static const int PLAYER_MUSIC_VOICE = 0x20000e; // 音量 - static const int PLAYER_MUTE_BUTTON = 0x20000f; // 静音 - static const int PLAYER_PAUSE = 0x200010; // 播放暂停 - static const int PLAYER_PHONE_COLOR = 0x200011; // 手机音乐模式绿色图片 - static const int PLAYER_PHONE_WHITE = 0x200012; // 手机音乐模式白色图片 - static const int PLAYER_PLAY = 0x200013; // 播放音乐 - static const int PLAYER_PLAYERSMODEL_LOOP = 0x200014; // 播放模式:循环播放 - static const int PLAYER_PLAYERSMODEL_RANDOM = 0x200015; // 播放模式:随机播放 - static const int PLAYER_PLAYERSMODEL_REPEATS = 0x200016; // 播放模式:单曲循环 - static const int PLAYER_PLAYERSMODEL_SEQUENCE = 0x200017; // 播放模式循序播放 - static const int PLAYER_PLAYING = 0x200018; // 播放音乐中 + static const int PLAYER_BLUETOOTH_COLOR = 0x200002; // 蓝牙图标蓝色图片 + static const int PLAYER_BLUETOOTH_GRAY = 0x200003; // 蓝牙图标灰色图片 + static const int PLAYER_DECREASE_BUTTON = 0x200004; // 点击后声音减少 + static const int PLAYER_DOWM_66 = 0x200005; // 朝下的66图片 + static const int PLAYER_EARPHONE = 0x200006; // 大的蓝牙耳机的icon + static const int PLAYER_EARPHONE_COLOR = 0x200007; // 蓝牙耳机模式绿色图片 + static const int PLAYER_EARPHONE_WHITE = 0x200008; // 蓝牙耳机模式白色图片 + static const int PLAYER_ELLIPSE = 0x200009; // 绿色椭圆 + static const int PLAYER_INCREASE_BUTTON = 0x20000a; // 点击后声音加 + static const int PLAYER_LOCAL_MUSIC_COLOR = 0x20000b; // 本地音乐模式绿色图片,默认本地模式 + static const int PLAYER_LOCAL_MUSIC_WHITE = 0x20000c; // 本地音乐模式白色图片 + static const int PLAYER_LOOK_CONNECTED_NOTE = 0x20000d; // 查看已连接蓝牙耳机提示图标 + static const int PLAYER_MUSIC_DELETE = 0x20000e; // 删除音乐 + static const int PLAYER_MUSIC_LIST = 0x20000f; // 音乐列表 + static const int PLAYER_MUSIC_NEXT = 0x200010; // 下一首音乐 + static const int PLAYER_MUSIC_PAUSE = 0x200011; // 播放暂停 + static const int PLAYER_MUSIC_PLAY = 0x200012; // 播放音乐 + static const int PLAYER_MUSIC_PLAYING = 0x200013; // 播放音乐中 + static const int PLAYER_MUSIC_PROVE = 0x200014; // 上一首音乐 + static const int PLAYER_MUSIC_VOICE = 0x200015; // 声音 + static const int PLAYER_MUTE_BUTTON = 0x200016; // 静音 + static const int PLAYER_PHONE_COLOR = 0x200017; // 手机音乐模式绿色图片 + static const int PLAYER_PHONE_WHITE = 0x200018; // 手机音乐模式白色图片 + static const int PLAYER_PLAYERSMODEL_LOOP = 0x200019; // 播放模式:循环播放 + static const int PLAYER_PLAYERSMODEL_RANDOM = 0x20001a; // 播放模式:随机播放 + static const int PLAYER_PLAYERSMODEL_REPEATS = 0x20001b; // 播放模式:单曲循环 + static const int PLAYER_PLAYERSMODEL_SEQUENCE = 0x20001c; // 播放模式: 循序播放 + static const int PLAYER_PLAYERSMODEL_UNUSABLE = 0x20001d; // 播放模型:不能使用 + static const int PLAYER_PLAYING_GLARY = 0x20001e; // 播放音乐中大的灰色图片 + static const int PLAYER_UP_66 = 0x20001f; // 朝上的66图片 + /* -------------------------------------------------------------------------- */ static const int CLOCK_CLOCK0 = 0x300001; static const int CLOCK_CLOCK1 = 0x300002; diff --git a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp index 39f51d5c2..f729e02a4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp @@ -85,6 +85,7 @@ namespace OHOS {VIEW_SET_DIAL_STYLE, PNG_APPLIST_CHANGEDIAL_IMAGE, PNG_APPLIST_CHANGEDIAL_IMAGE, PNG_APPLIST_DEFAULT_IMG, "更换表盘", STR_WATCH_FACE, nullptr}, {VIEW_SAVEELE, PNG_APPLIST_SAVEELE_IMAGE, PNG_APPLIST_SAVEELE_IMAGE, PNG_APPLIST_DEFAULT_IMG, "省电模式", STR_POWER_SAVE_MODE, nullptr}, {VIEW_SLEEP, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_DEFAULT_IMG, "睡眠", STR_SLEEP, nullptr}, + // {VIEW_MUSIC_PLAYER, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_DEFAULT_IMG, "音乐播放器", STR_MUSIC, nullptr}, {VIEW_SETTING, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_DEFAULT_IMG, "设置", STR_SETTINGS, nullptr}, #if 0 /*屏蔽Slice*/ diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/include/MainViewSample.h b/code/sdk/application/wearable/fd230app/nativeui/main/include/MainViewSample.h index df7632166..805270e12 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/include/MainViewSample.h +++ b/code/sdk/application/wearable/fd230app/nativeui/main/include/MainViewSample.h @@ -23,7 +23,7 @@ #include "CompassControlView.h" #include "DialViewGroup.h" #include "MainClockView.h" -#include "PlayersView.h" +#include "player/include/PlayersView.h" #include "MainPresenterSample.h" #include "HeartRateView.h" #include "components/ui_card_page.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h index 07a41562c..063bf6855 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h @@ -1,7 +1,9 @@ /* - * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved. - * Description: VolumeSettingView view - * Create: 2021-09-5 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-08-05 15:20:02 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-08-06 16:30:51 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h */ #ifndef VOLUME_SETTING_PRESENTER_H @@ -12,7 +14,7 @@ #include "components/ui_view_group.h" #include "components/ui_slider.h" #include "VolumeSettingView.h" -#include "PlayersView.h" +#include "player/include/PlayersView.h" #include "BaseView.h" namespace OHOS { diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h b/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h index 55740c234..1076ee794 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h @@ -1,7 +1,9 @@ /* - * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved. - * Description: VolemeSettingView view - * Create: 2021-09-5 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-08-05 15:20:02 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-08-06 16:26:51 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h */ #ifndef VOLUME_SETTING_VIEW_H @@ -11,7 +13,7 @@ #include "components/ui_button.h" #include "components/ui_view_group.h" #include "components/ui_slider.h" -#include "PlayersView.h" +#include "player/include/PlayersView.h" #include "BaseView.h" #include "wearable_log.h" #include "VolumeSettingPresenter.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h deleted file mode 100644 index 9f46aa7d5..000000000 --- a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author: luozheng 1732036298@qq.com - * @Date: 2024-08-02 15:21:47 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-02 15:58:32 - * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h - */ -#include "components/ui_card_page.h" - -namespace OHOS -{ - class MusicPlayerControlView : public UICardPage - { - public: - MusicPlayerControlView(); - ~MusicPlayerControlView(); - static MusicPlayerControlView *GetInstance(void); - - private: - }; - -} \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h index 452977770..c2193fe9a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-08-01 18:02:51 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-02 15:57:46 + * @LastEditTime: 2024-08-06 15:09:50 * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h */ @@ -12,7 +12,6 @@ #include "BaseView.h" #include "View.h" -#include "musicplayer/include/MusicPlayerControlView.h" namespace OHOS { @@ -32,7 +31,6 @@ namespace OHOS private: void CreateMusicPlayerView(void); void ClearAll(void); - MusicPlayerControlView *musicPlayerControlView{nullptr}; bool viewInitStatus{false}; }; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp deleted file mode 100644 index ce48fb6f5..000000000 --- a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author: luozheng 1732036298@qq.com - * @Date: 2024-08-02 15:26:48 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-02 15:56:37 - * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp - */ -#include "musicplayer/include/MusicPlayerControlView.h" -#include "wearable_log.h" -namespace OHOS -{ - static MusicPlayerControlView *g_pMusicPlayerControlView{nullptr}; - MusicPlayerControlView::MusicPlayerControlView() - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MusicPlayerControlView::MusicPlayerControlView"); - g_pMusicPlayerControlView = this; - } - - MusicPlayerControlView::~MusicPlayerControlView() - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MusicPlayerControlView::~MusicPlayerControlView"); - g_pMusicPlayerControlView = nullptr; - } - - MusicPlayerControlView *MusicPlayerControlView::GetInstance(void) - { - return g_pMusicPlayerControlView; - } - -} \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerView.cpp b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerView.cpp index 8738d4b93..b9510f8c9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-05-07 11:25:58 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-02 16:13:00 + * @LastEditTime: 2024-08-06 15:10:00 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/MusicPlayer/src/MusicPlayerView.cpp */ #include "musicplayer/include/MusicPlayerPresenter.h" @@ -41,16 +41,6 @@ namespace OHOS void MusicPlayerView::CreateMusicPlayerView(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MusicPlayerView::CreateMusicPlayerView"); - if (musicPlayerControlView == nullptr) - { - musicPlayerControlView = new MusicPlayerControlView(); - if (musicPlayerControlView == nullptr) - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "musicPlayerControlView new fail!!"); - return; - } - } - container_->Add(musicPlayerControlView); } void MusicPlayerView::OnStart() @@ -81,7 +71,6 @@ namespace OHOS { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MusicPlayerView::OnSetUpView"); View::OnSetUpView(); - Draw(); return; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersView.h b/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersView.h index 66cdbf906..ae5c95891 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersView.h @@ -25,7 +25,7 @@ #include "font/ui_font.h" #include "graphic_config.h" #include "components/ui_card_page.h" -#include "PlayersPresenter.h" +#include "player/include/PlayersPresenter.h" #include "components/ui_scroll_view.h" #include "PlayerListDelSongView.h" #include "common/image_cache_manager.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/BluetoothView.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/BluetoothView.cpp index 1bbbc9590..d1cdfd87e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/BluetoothView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/BluetoothView.cpp @@ -3,8 +3,8 @@ * Description: bluetooth view 设置页面 * Create: 2021-09-5 */ -#include "BluetoothView.h" -#include "PlayersView.h" +#include "player/include/BluetoothView.h" +#include "player/include/PlayersView.h" #include "UiConfig.h" #include "BluetoothEarPhoneView.h" #include "PlayersPresenter.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp index 0426fd9d4..a264c0cad 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp @@ -2,10 +2,10 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-12 14:15:45 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-28 09:47:26 + * @LastEditTime: 2024-08-06 16:18:03 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp */ -#include "PlayerListitemView.h" +#include "player/include/PlayerListitemView.h" #include "ui_resource_image.h" #include "common/image_cache_manager.h" namespace OHOS diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersCaseListAdapter.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersCaseListAdapter.cpp index e5d9f454e..17b87d47d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersCaseListAdapter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersCaseListAdapter.cpp @@ -5,13 +5,13 @@ * Create: 2021-07-26 */ #include -#include "PlayersCaseListAdapter.h" +#include "player/include/PlayersCaseListAdapter.h" #include "gfx_utils/list.h" -#include "PlayersView.h" -#include "PlayersPresenter.h" +#include "player/include/PlayersView.h" +#include "player/include/PlayersPresenter.h" #include "wearable_log.h" -#include "PlayersModel.h" -#include "PlayerListitemView.h" +#include "player/include/PlayersModel.h" +#include "player/include/PlayerListitemView.h" #include "ui_resource_image.h" #include "common/image_cache_manager.h" namespace OHOS { @@ -54,7 +54,7 @@ uint16_t PlayersCaseListAdapter::GetCount() void BtnOnClickListListener::SongClick(PlayersCaseListAdapter *P_PlayersCaseListAdapter,int index) { - ImageInfo *imagePlaying = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAYING, PLAYER_IAMGES); + ImageInfo *imagePlaying = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES); P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_label[index]->SetTextColor(Color::GetColorFromRGBA(0x4f, 0xc3, 0x4c, 0xff)); P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_button[index]->SetImageSrc(imagePlaying,imagePlaying); //P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_button[index]->SetViewId("playing"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp index f424ee7bf..3d06328e8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp @@ -5,13 +5,13 @@ * Create: 2021-07-26 */ -#include "PlayersModel.h" +#include "player/include/PlayersModel.h" #include "thread_adapter.h" #include "UiConfig.h" #include "bts_avrcp_controller.h" #include "bts_avrcp_target.h" #include "bts_a2dp_source.h" -#include "BluetoothModel.h" +#include "bluetooth/include/BluetoothModel.h" namespace OHOS { diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersPresenter.cpp index 011d3b880..ef2e46c6f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersPresenter.cpp @@ -9,16 +9,16 @@ #include #include #include -#include "PlayersPresenter.h" +#include "player/include/PlayersPresenter.h" #include "wearable_log.h" #include "common/image_cache_manager.h" #include "UiConfig.h" #include "ui_resource_image.h" -#include "PlayersView.h" -#include "PlayersModel.h" +#include "player/include/PlayersView.h" +#include "player/include/PlayersModel.h" #include "BluetoothPresenter.h" #include "graphic_service.h" -#include "PhoneService.h" +#include "phoneservice/include/PhoneService.h" #include "bts_avrcp_controller.h" #include "bts_avrcp_target.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersView.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersView.cpp index fa1d101b4..ccefa9d83 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersView.cpp @@ -8,22 +8,16 @@ #include #include "common/image_cache_manager.h" #include "ui_resource_image.h" -#include "PlayersView.h" +#include "player/include/PlayersView.h" #include "UiConfig.h" -#include "PlayersModel.h" -#include "PlayersCaseListAdapter.h" -#include "MainViewSample.h" +#include "player/include/PlayersModel.h" +#include "player/include/PlayersCaseListAdapter.h" +#include "main/include/MainViewSample.h" #include "traing/training_card/include/TraingCardView.h" namespace OHOS { static PlayersView *g_pPlayersView = nullptr; - -#define STEP_LABEL_X 166 -#define STEP_LABEL_Y 30 -#define TEXT_WIDTH 120 -#define TEXT_HEIGHT 30 - PlayersView::PlayersView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersView::PlayersView"); @@ -412,8 +406,8 @@ namespace OHOS } playerButton->SetPosition(195, 195, 80, 80); // 140:x 139:y 172:width 172:height playerButton->SetOnClickListener(playerlistener); - // ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAY, PLAYER_IAMGES); // 播放图片 - // ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PAUSE, PLAYER_IAMGES); // 暂停图片 + // ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES); // 播放图片 + // ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PAUSE, PLAYER_IAMGES); // 暂停图片 // playerButton->SetImages(ImagePlay, ImagerPause); Add(playerButton); @@ -998,8 +992,8 @@ namespace OHOS ImageInfo *ImagePlay; ImageInfo *ImagerPause; - ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAY, PLAYER_IAMGES); // 播放图片 - ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PAUSE, PLAYER_IAMGES); // 暂停图片 + ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES); // 播放图片 + ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PAUSE, PLAYER_IAMGES); // 暂停图片 playerButton->SetImages(ImagePlay, ImagerPause); if(LoadPlayerButtonImage(nextButton,PLAYER_MUSIC_NEXT) == false) @@ -1050,8 +1044,8 @@ namespace OHOS ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_BACKGROUND,PLAYER_IAMGES); ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_ELLIPSE,PLAYER_IAMGES); - ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_PLAY,PLAYER_IAMGES); - ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_PAUSE,PLAYER_IAMGES); + ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PLAY,PLAYER_IAMGES); + ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PAUSE,PLAYER_IAMGES); ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_NEXT,PLAYER_IAMGES); ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PROVE,PLAYER_IAMGES); ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_LIST,PLAYER_IAMGES); diff --git a/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp b/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp index 5887f6d2d..33fa873a7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp @@ -1,14 +1,9 @@ -/*** - * @Date: 2024-04-15 10:55:58 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-05-10 11:05:32 - * @FilePath: /sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp - */ /* - * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved. - * Description: ScreenModels - * Author: - * Create: 2022-01-22 + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-08-05 15:20:03 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-08-06 16:32:50 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp */ #include "wearable_log.h" @@ -72,7 +67,7 @@ bool ScreenModels::LoadAppImages(std::string file, UIImageView *view, uint32_t r void ScreenModels::PreLoadAppimages(void) { - LoadAppMultiImages(PLAYER_IAMGES, PLAYER_BACKGROUND, PLAYER_PLAYING); + LoadAppMultiImages(PLAYER_IAMGES, PLAYER_BACKGROUND, PLAYER_UP_66); //LoadAppMultiImages(CLOCK_IAMGES, CLOCK_CLOCK0, CLOCK_SECOND); LoadAppMultiImages(COMPASS_IAMGES, COMPASS_COMPASS0, COMPASS_COMPASS2); LoadAppMultiImages(DROPDOWN_IAMGES, DROPDOWN_BLUETOOTHCONNECTED, DROPDOWN_SETTING); -- 2.17.1