Merge #71 into xts_origin from refs/changes/71/head 72/target/2
author罗正 <1732036298@qq.com>
Wed, 24 Apr 2024 01:37:25 +0000 (01:37 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Wed, 24 Apr 2024 01:37:25 +0000 (01:37 +0000)
Code review from 罗正

* refs/changes/71/head: (9 commits squashed)

  - 增加震动提醒功能

  - Merge branch &#39;xts_origin&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into xts_origin

  - 1.设置中增加网络与通话Slice,显示方式Slice去除快速访问Slice
    2.修改多国语言适配设置界面
    3.增加网络与通话界面图片

  - Merge branch &#39;xts_origin&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into xts_origin

  - VoLTE,移动数据按钮增加点击监听

  - 添加移动数据选项页面

  - Merge branch &#39;xts_origin&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into xts_origin

  - 增加运动识别Slice

  - 修改设置视图以适配多国语言

Signed-off-by: 罗正 <1732036298@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/71
36 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h
code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h
code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_en.txt
code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_zh.txt
code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_en.xml
code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_zh.xml
code/sdk/application/wearable/fd230app/nativeui/language/font/en.lang
code/sdk/application/wearable/fd230app/nativeui/language/font/ja.lang
code/sdk/application/wearable/fd230app/nativeui/language/font/ui_resource_string.h
code/sdk/application/wearable/fd230app/nativeui/language/font/zh.lang
code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionView.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/MobileDataOptionsView.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallPresenter.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallView.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/MobileDataOptionsView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItem.h
code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h
code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingModel.h
code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp
code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ja.lang
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_DISPLAY_MODE.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_MOTION_RECOGNITION.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_NETWORKANDCALL.bin [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_QUICK_ACCESS.bin [deleted file]

index 499db92..362be06 100644 (file)
@@ -317,6 +317,15 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/flashlight/src/FlashlightView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/flashlight/src/FlashlightModel.cpp
 
+    #网络与通话
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/networkandcall/src/NetworkAndCallView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/networkandcall/src/MobileDataOptionsView.cpp
+
+    #运动识别
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/motionrecognition/src/MotionRecognitionPresenter.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/motionrecognition/src/MotionRecognitionView.cpp
+
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/language/LanguageInit.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/config/src/ConfigModel.cpp
 
index c40e47e..4aae8b9 100644 (file)
@@ -58,6 +58,8 @@ typedef enum : uint16_t
     VIEW_DNOTDISTURB,             // 勿扰模式
     VIEW_FLASHLIGHT,              // 手电筒
     VIEW_BRIGHTNESSLEVEL,         // 亮度调节
+    VIEW_NETWORKANDCALL,          // 网络与通话
+    VIEW_MOTION_RECOGNITION,      // 运动识别
     /* ----------------------------------- 录音 ----------------------------------- */
     VIEW_RECORD,
     /* ---------------------------------- 界面 ---------------------------------- */
@@ -104,7 +106,7 @@ typedef enum : uint16_t
 #ifdef SUPPORT_ALIPAY_SEC
     VIEW_MAIN_ALIPAY,
 #endif
-    VIEW_SET_DESKTOP,
+    VIEW_SET_DESKTOP,//显示方式
     VIEW_SET_CARD,
     VIEW_ADD_CARD,
     VIEW_SET_DIAL,
index 3ec9939..8af622f 100644 (file)
@@ -54,6 +54,8 @@ namespace OHOS
         void InitDnotDisturbSlice(void);
         void InitFlashlightSlice(void);
         void InitBrightnessLevelSlice(void);
+        void InitNetworkAndCallSlice(void);
+        void InitMotionRecognitionSlice(void);
         /* --------------------------------界面------------------------------------ */
         void InitRotateSlice(void);
         void InitBloodSlice(void);
index 3de41cc..34b8351 100644 (file)
@@ -241,7 +241,7 @@ namespace OHOS
     static constexpr const char *PNG_A019_095_IMAGE_PATH = APP_RES_PATH "/BLUETOOTH_IMAGE_16.bin";
     static constexpr const char *PNG_BLUETOOTHEAR = APP_RES_PATH "/BLUETOOTHEAR.bin";
     /* --------------------------------- AppList -------------------------------- */
-    static constexpr const char *PNG_APPLIST_THEME_IMAGE = APP_LIST_PATH "/theme.bin";              // 主题样式
+    static constexpr const char *PNG_APPLIST_THEME_IMAGE = APP_LIST_PATH "/theme.bin";              // 显示方式
     static constexpr const char *PNG_APPLIST_CARDSET_IMAGE = APP_LIST_PATH "/cardsetting.bin";      // 卡片管理
     static constexpr const char *PNG_APPLIST_CHANGEDIAL_IMAGE = APP_LIST_PATH "/changedial.bin";    // 切换表盘
     static constexpr const char *PNG_APPLIST_ALARM_IMAGE = APP_LIST_PATH "/alarm.bin";              // 闹钟
@@ -287,9 +287,11 @@ namespace OHOS
     static constexpr const char *PNG_WALK_STEPS_IMAGE = APP_RES_PATH "/STEPS_IMAGE.bin";
     /* ----------------------------------- 设置 ----------------------------------- */
     static constexpr const char *PNG_SETTINGS_DISPLAY_BRIGHTNESS = APP_RES_PATH "/settings/SETTINGS_DISPLAY_BRIGHTNESS.bin"; // 显示与亮度
+    static constexpr const char *PNG_SETTINGS_NETWORKANDCALL = APP_RES_PATH "/settings/SETTINGS_NETWORKANDCALL.bin";         // 通话与网络
     static constexpr const char *PNG_SETTINGS_BLUETOOTH = APP_RES_PATH "/settings/SETTINGS_BLUETOOTH.bin";                   // 蓝牙
     static constexpr const char *PNG_SETTINGS_SOUND_VIBRATION = APP_RES_PATH "/settings/SETTINGS_SOUND_VIBRATION.bin";       // 声音与震动
-    static constexpr const char *PNG_SETTINGS_SECONDARY_FUNCTION = APP_RES_PATH "/settings/SETTINGS_QUICK_ACCESS.bin";       // 辅助功能
+    static constexpr const char *PNG_SETTINGS_DISPLAY_MODE = APP_RES_PATH "/settings/SETTINGS_DISPLAY_MODE.bin";             // 显示方式
+    static constexpr const char *PNG_SETTINGS_MOTION_RECOGNITION = APP_RES_PATH "/settings/SETTINGS_MOTION_RECOGNITION.bin"; // 运动识别
     static constexpr const char *PNG_SETTINGS_SYSTEM = APP_RES_PATH "/settings/SETTINGS_SYSTEM.bin";                         // 系统
     static constexpr const char *PNG_SETTINGS_SETTINGS_POWER_CONTROL = APP_RES_PATH "/settings/SETTINGS_POWER_CONTROL.bin";  // 关机和重启
     /* ---------------------------------- 消息中心 ---------------------------------- */
index 8446d43..38660a6 100644 (file)
 
 #include "brightnesslevel/include/BrightnessLevelPresenter.h"
 #include "brightnesslevel/include/BrightnessLevelView.h"
+
+#include "networkandcall/include/NetworkAndCallPresenter.h"
+#include "networkandcall/include/NetworkAndCallView.h"
+
+#include "motionrecognition/include/MotionRecognitionPresenter.h"
+#include "motionrecognition/include/MotionRecognitionView.h"
 /* -------------------------------------------------------------------------- */
 #include "traing/include/TraingView.h"
 #include "traing/include/TraingPresenter.h"
@@ -236,16 +242,19 @@ namespace OHOS
         {VIEW_CONNECT_PHONE, &NativeLauncher::InitConnectPhoneSlice},
         {VIEW_INDOORWALK, &NativeLauncher::InitIndoorWalkSlice},
         {VIEW_SHUTDOWN_OR_REBOOT, &NativeLauncher::InitRebootSlice},
-        {VIEW_WEATHER, &NativeLauncher::InitWeatherSlice},                            // 天气
-        {VIEW_SYSTEM, &NativeLauncher::InitSystemSlice},                              // 系统实例化地址
-        {VIEW_SOUND_VIBRATION, &NativeLauncher::InitSoundAndVibrationSlice},          // 声音与震动实例化地址
-        {VIEW_SYSTEM_VOLUME, &NativeLauncher::InitSystemVolumeSlice},                 // 系统音量
-        {VIEW_CALL_VOLUME, &NativeLauncher::InitCallVolumeSlice},                 // 系统音量
-        {VIEW_CLASSIC_BLUETOOTH, &NativeLauncher::InitClassicBluetoothSlice},         // 经典蓝牙slice
-        {VIEW_DISPLAY_BRIGHTNESS, &NativeLauncher::InitDisplayBrightnessSlice},       // 显示与亮度的实例化地址
-        {VIEW_SECONDARY_FUNCTION, &NativeLauncher::InitSecondaryFunction},
-        {VIEW_FAST_TRAINING, &NativeLauncher::InitFastTrainingSlice},
-        {VIEW_FAST_TRAINING_ATTENTION, &NativeLauncher::InitFastTrainingAttentionSlice},
+        {VIEW_WEATHER, &NativeLauncher::InitWeatherSlice},                      // 天气
+        {VIEW_SYSTEM, &NativeLauncher::InitSystemSlice},                        // 系统实例化地址
+        {VIEW_SOUND_VIBRATION, &NativeLauncher::InitSoundAndVibrationSlice},    // 声音与震动实例化地址
+        {VIEW_SYSTEM_VOLUME, &NativeLauncher::InitSystemVolumeSlice},           // 系统音量
+        {VIEW_CALL_VOLUME, &NativeLauncher::InitCallVolumeSlice},               // 系统音量
+        {VIEW_CLASSIC_BLUETOOTH, &NativeLauncher::InitClassicBluetoothSlice},   // 经典蓝牙slice
+        {VIEW_DISPLAY_BRIGHTNESS, &NativeLauncher::InitDisplayBrightnessSlice}, // 显示与亮度的实例化地址
+        {VIEW_NETWORKANDCALL, &NativeLauncher::InitNetworkAndCallSlice},        // 网络与通话
+        {VIEW_MOTION_RECOGNITION, &NativeLauncher::InitMotionRecognitionSlice},        // 网络与通话
+
+        // {VIEW_SECONDARY_FUNCTION, &NativeLauncher::InitSecondaryFunction},
+        // {VIEW_FAST_TRAINING, &NativeLauncher::InitFastTrainingSlice},
+        // {VIEW_FAST_TRAINING_ATTENTION, &NativeLauncher::InitFastTrainingAttentionSlice},
 
         {VIEW_RECORD, &NativeLauncher::InitRecordingSlice}, // 录音实例化地址
         {VIEW_FIND_PHONE, &NativeLauncher::InitFindPhoneSlice},
@@ -1044,6 +1053,29 @@ namespace OHOS
         NativeAbility::GetInstance().AddSliceProxy(VIEW_BRIGHTNESSLEVEL, brightnesslevel);
     }
 
+    /*网络与通话*/
+    void NativeLauncher::InitNetworkAndCallSlice(void)
+    {
+        SliceProxy *networkandcall = new AbilitySliceProxy<NetworkAndCallView, NetworkAndCallPresenter>;
+        if (networkandcall == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "networkandcall");
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_NETWORKANDCALL, networkandcall);
+    }
+
+    /*网络与通话*/
+    void NativeLauncher::InitMotionRecognitionSlice(void)
+    {
+        SliceProxy *motionrecognition = new AbilitySliceProxy<MotionRecognitionView, MotionRecognitionPresenter>;
+        if (motionrecognition == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "motionrecognition");
+            return;
+        }
+        NativeAbility::GetInstance().AddSliceProxy(VIEW_MOTION_RECOGNITION, motionrecognition);
+    }
     /* -------------------------------------------------------------------------- */
     void NativeLauncher::InitSetDesktopSlice(void)
     {
index fe332eb..7e54217 100644 (file)
@@ -238,43 +238,11 @@ STR_OFF$Off
 STR_MORE$More\r
 STR_SETTING$Setting\r
 STR_SCREEN_AND_BRIGHTNESS$Screen and Brightness\r
-STR_BRIGHTNESS_ADJUSTMENT$Brightness Adjustment\r
-STR_SCREEN_ON_DURATION$Screen On Duration\r
-STR_5_SECONDS$5 Seconds\r
-STR_10_SECONDS$10 Seconds\r
-STR_15_SECONDS$15 Seconds\r
-STR_30_SECONDS$30 Seconds\r
-STR_60_SECONDS$60 Seconds\r
-STR_300_SECONDS$300 Seconds\r
-STR_RAISE_TO_WAKE$Raise to Wake\r
+STR_NETWORKANDCALL$NetworkAndCall\r
 STR_BLUETOOTH$Bluetooth\r
-STR_BLUETOOTH_HEADPHONES$Bluetooth Headphones\r
-STR_TRADITIONAL_BLUETOOTH$Traditional Bluetooth\r
-STR_AUTO_OFF_BLUETOOTH_NOTE$Note: It will be automatically turned off if the connection is not successful for 10 minutes after opening, because the traditional Bluetooth will increase the power consumption for a long time, it is recommended to use when necessary \n\n(this function is mainly used for phone calls/notifications, music control/transmission, etc.)\r
 STR_SOUND_AND_VIBRATION$Sound and Vibration\r
-STR_SYSTEM_VOLUME$System Volume\r
-STR_ALARM_REMINDERS_FIND_WATCH$Alarms, Reminders, Find Watch\r
-STR_CALL_VOLUME$Call Volume\r
-STR_WATCH_CALLS$Watch Calls\r
-STR_MEDIA_VOLUME$Media Volume\r
-STR_MUSIC_RECORDINGS_WORKOUTS$Music, Recordings, Workouts\r
-STR_VIBRATION_REMINDER$Vibration Reminder\r
-STR_SILENT_MODE$Silent Mode\r
-STR_SYSTEM_VOLUME_UNAFFECTED$System Volume Unaffected\r
-STR_QUICK_ACCESS$Quick Access\r
-STR_ACCESSIBILITY$Accessibility\r
-STR_ACCESSIBILITY_BUTTON$Accessibility Button\r
-STR_QUICK_ACCESS_APP$This function can be set with the lower right button Quick access to the APP\r
-STR_HEART_RATE_MONITORING$Heart Rate Monitoring\r
-STR_BLOOD_OXYGEN_MONITORING$Blood Oxygen Monitoring\r
-STR_SYSTEM$System \r
-STR_ABOUT_WATCH$About Watch\r
-STR_REGULATORY_MODE$Regulatory Mode\r
-STR_SWITCH_LANGUAGE$Switch Language\r
-STR_LANGUAGE$Language\r
-STR_FACTORY_RESET$Factory Reset\r
-STR_SYSTEM_UPDATE$System Update\r
+STR_DISPLAY_MODE$Display Mode\r
+STR_MOTION_RECOGNITION$Motion Recognition\r
+STR_SYSTEM$System\r
 STR_SHUTDOWN_AND_RESTART$Shutdown and Restart\r
-STR_RESTART$Restart\r
-STR_SHUTDOWN$Shutdown\r
-STR_4G_CAPABILITY$4G capability\r
+STR_LANGUAGE$Language 
\ No newline at end of file
index b1dbddb..fa04d28 100644 (file)
@@ -238,43 +238,11 @@ STR_OFF$关闭
 STR_MORE$更多\r
 STR_SETTING$设置\r
 STR_SCREEN_AND_BRIGHTNESS$屏幕与亮度\r
-STR_BRIGHTNESS_ADJUSTMENT$亮度调节\r
-STR_SCREEN_ON_DURATION$亮屏时长\r
-STR_5_SECONDS$5秒\r
-STR_10_SECONDS$10秒\r
-STR_15_SECONDS$15秒\r
-STR_30_SECONDS$30秒\r
-STR_60_SECONDS$60秒\r
-STR_300_SECONDS$300秒\r
-STR_RAISE_TO_WAKE$抬腕亮屏\r
+STR_NETWORKANDCALL$网络与通话\r
 STR_BLUETOOTH$蓝牙\r
-STR_BLUETOOTH_HEADPHONES$蓝牙耳机\r
-STR_TRADITIONAL_BLUETOOTH$传统蓝牙\r
-STR_AUTO_OFF_BLUETOOTH_NOTE$注:开启后10分钟没连接成功会自动关闭,因为传统蓝牙长时间打开会增加电耗,建议在有需要的时候使用\n\n(该功能主要用于电话拨打/通知、音乐控制/传输等)\r
 STR_SOUND_AND_VIBRATION$声音与震动\r
-STR_SYSTEM_VOLUME$系统音量\r
-STR_ALARM_REMINDERS_FIND_WATCH$闹钟、提醒、查找手表\r
-STR_CALL_VOLUME$通话音量\r
-STR_WATCH_CALLS$手表通话\r
-STR_MEDIA_VOLUME$媒体音量\r
-STR_MUSIC_RECORDINGS_WORKOUTS$音乐、录音、训练\r
-STR_VIBRATION_REMINDER$震动提醒\r
-STR_SILENT_MODE$静音模式\r
-STR_SYSTEM_VOLUME_UNAFFECTED$系统音量不受影响\r
-STR_QUICK_ACCESS$快速访问\r
-STR_ACCESSIBILITY$辅助功能\r
-STR_ACCESSIBILITY_BUTTON$辅助按钮\r
-STR_QUICK_ACCESS_APP$此功能可设置右下方按钮\n快速访问的APP\r
-STR_HEART_RATE_MONITORING$心率监测\r
-STR_BLOOD_OXYGEN_MONITORING$血氧监测\r
+STR_DISPLAY_MODE$显示方式\r
+STR_MOTION_RECOGNITION$运动识别\r
 STR_SYSTEM$系统\r
-STR_ABOUT_WATCH$关于手表\r
-STR_REGULATORY_MODE$监管模式\r
-STR_SWITCH_LANGUAGE$切换语言\r
-STR_LANGUAGE$语言\r
-STR_FACTORY_RESET$恢复出厂\r
-STR_SYSTEM_UPDATE$系统升级\r
 STR_SHUTDOWN_AND_RESTART$关机和重启\r
-STR_RESTART$重启\r
-STR_SHUTDOWN$关机\r
-STR_4G_CAPABILITY$4G能力
\ No newline at end of file
+STR_LANGUAGE$语言
\ No newline at end of file
index c88f33d..e8e0617 100644 (file)
        <lanstr id="STR_MORE" value="More"/>
        <lanstr id="STR_SETTING" value="Setting"/>
        <lanstr id="STR_SCREEN_AND_BRIGHTNESS" value="Screen and Brightness"/>
-       <lanstr id="STR_BRIGHTNESS_ADJUSTMENT" value="Brightness Adjustment"/>
-       <lanstr id="STR_SCREEN_ON_DURATION" value="Screen On Duration"/>
-       <lanstr id="STR_5_SECONDS" value="5 Seconds"/>
-       <lanstr id="STR_10_SECONDS" value="10 Seconds"/>
-       <lanstr id="STR_15_SECONDS" value="15 Seconds"/>
-       <lanstr id="STR_30_SECONDS" value="30 Seconds"/>
-       <lanstr id="STR_60_SECONDS" value="60 Seconds"/>
-       <lanstr id="STR_300_SECONDS" value="300 Seconds"/>
-       <lanstr id="STR_RAISE_TO_WAKE" value="Raise to Wake"/>
+       <lanstr id="STR_NETWORKANDCALL" value="NetworkAndCall"/>
        <lanstr id="STR_BLUETOOTH" value="Bluetooth"/>
-       <lanstr id="STR_BLUETOOTH_HEADPHONES" value="Bluetooth Headphones"/>
-       <lanstr id="STR_TRADITIONAL_BLUETOOTH" value="Traditional Bluetooth"/>
-       <lanstr id="STR_AUTO_OFF_BLUETOOTH_NOTE" value="Note: It will be automatically turned off if the connection is not successful for 10 minutes after opening, because the traditional Bluetooth will increase the power consumption for a long time, it is recommended to use when necessary \n\n(this function is mainly used for phone calls/notifications, music control/transmission, etc.)"/>
        <lanstr id="STR_SOUND_AND_VIBRATION" value="Sound and Vibration"/>
-       <lanstr id="STR_SYSTEM_VOLUME" value="System Volume"/>
-       <lanstr id="STR_ALARM_REMINDERS_FIND_WATCH" value="Alarms, Reminders, Find Watch"/>
-       <lanstr id="STR_CALL_VOLUME" value="Call Volume"/>
-       <lanstr id="STR_WATCH_CALLS" value="Watch Calls"/>
-       <lanstr id="STR_MEDIA_VOLUME" value="Media Volume"/>
-       <lanstr id="STR_MUSIC_RECORDINGS_WORKOUTS" value="Music, Recordings, Workouts"/>
-       <lanstr id="STR_VIBRATION_REMINDER" value="Vibration Reminder"/>
-       <lanstr id="STR_SILENT_MODE" value="Silent Mode"/>
-       <lanstr id="STR_SYSTEM_VOLUME_UNAFFECTED" value="System Volume Unaffected"/>
-       <lanstr id="STR_QUICK_ACCESS" value="Quick Access"/>
-       <lanstr id="STR_ACCESSIBILITY" value="Accessibility"/>
-       <lanstr id="STR_ACCESSIBILITY_BUTTON" value="Accessibility Button"/>
-       <lanstr id="STR_QUICK_ACCESS_APP" value="This function can be set with the lower right button Quick access to the APP"/>
-       <lanstr id="STR_HEART_RATE_MONITORING" value="Heart Rate Monitoring"/>
-       <lanstr id="STR_BLOOD_OXYGEN_MONITORING" value="Blood Oxygen Monitoring"/>
+       <lanstr id="STR_DISPLAY_MODE" value="Display Mode"/>
+       <lanstr id="STR_MOTION_RECOGNITION" value="Motion Recognition"/>
        <lanstr id="STR_SYSTEM" value="System"/>
-       <lanstr id="STR_ABOUT_WATCH" value="About Watch"/>
-       <lanstr id="STR_REGULATORY_MODE" value="Regulatory Mode"/>
-       <lanstr id="STR_SWITCH_LANGUAGE" value="Switch Language"/>
-       <lanstr id="STR_LANGUAGE" value="Language"/>
-       <lanstr id="STR_FACTORY_RESET" value="Factory Reset"/>
-       <lanstr id="STR_SYSTEM_UPDATE" value="System Update"/>
        <lanstr id="STR_SHUTDOWN_AND_RESTART" value="Shutdown and Restart"/>
-       <lanstr id="STR_RESTART" value="Restart"/>
-       <lanstr id="STR_SHUTDOWN" value="Shutdown"/>
-       <lanstr id="STR_4G_CAPABILITY" value="4G capability"/>
+       <lanstr id="STR_LANGUAGE" value="Language"/>
 </language>
index 2b50734..b9ec11c 100644 (file)
        <lanstr id="STR_MORE" value="更多"/>
        <lanstr id="STR_SETTING" value="设置"/>
        <lanstr id="STR_SCREEN_AND_BRIGHTNESS" value="屏幕与亮度"/>
-       <lanstr id="STR_BRIGHTNESS_ADJUSTMENT" value="亮度调节"/>
-       <lanstr id="STR_SCREEN_ON_DURATION" value="亮屏时长"/>
-       <lanstr id="STR_5_SECONDS" value="5秒"/>
-       <lanstr id="STR_10_SECONDS" value="10秒"/>
-       <lanstr id="STR_15_SECONDS" value="15秒"/>
-       <lanstr id="STR_30_SECONDS" value="30秒"/>
-       <lanstr id="STR_60_SECONDS" value="60秒"/>
-       <lanstr id="STR_300_SECONDS" value="300秒"/>
-       <lanstr id="STR_RAISE_TO_WAKE" value="抬腕亮屏"/>
+       <lanstr id="STR_NETWORKANDCALL" value="网络与通话"/>
        <lanstr id="STR_BLUETOOTH" value="蓝牙"/>
-       <lanstr id="STR_BLUETOOTH_HEADPHONES" value="蓝牙耳机"/>
-       <lanstr id="STR_TRADITIONAL_BLUETOOTH" value="传统蓝牙"/>
-       <lanstr id="STR_AUTO_OFF_BLUETOOTH_NOTE" value="注:开启后10分钟没连接成功会自动关闭,因为传统蓝牙长时间打开会增加电耗,建议在有需要的时候使用\n\n(该功能主要用于电话拨打/通知、音乐控制/传输等)"/>
        <lanstr id="STR_SOUND_AND_VIBRATION" value="声音与震动"/>
-       <lanstr id="STR_SYSTEM_VOLUME" value="系统音量"/>
-       <lanstr id="STR_ALARM_REMINDERS_FIND_WATCH" value="闹钟、提醒、查找手表"/>
-       <lanstr id="STR_CALL_VOLUME" value="通话音量"/>
-       <lanstr id="STR_WATCH_CALLS" value="手表通话"/>
-       <lanstr id="STR_MEDIA_VOLUME" value="媒体音量"/>
-       <lanstr id="STR_MUSIC_RECORDINGS_WORKOUTS" value="音乐、录音、训练"/>
-       <lanstr id="STR_VIBRATION_REMINDER" value="震动提醒"/>
-       <lanstr id="STR_SILENT_MODE" value="静音模式"/>
-       <lanstr id="STR_SYSTEM_VOLUME_UNAFFECTED" value="系统音量不受影响"/>
-       <lanstr id="STR_QUICK_ACCESS" value="快速访问"/>
-       <lanstr id="STR_ACCESSIBILITY" value="辅助功能"/>
-       <lanstr id="STR_ACCESSIBILITY_BUTTON" value="辅助按钮"/>
-       <lanstr id="STR_QUICK_ACCESS_APP" value="此功能可设置右下方按钮\n快速访问的APP"/>
-       <lanstr id="STR_HEART_RATE_MONITORING" value="心率监测"/>
-       <lanstr id="STR_BLOOD_OXYGEN_MONITORING" value="血氧监测"/>
+       <lanstr id="STR_DISPLAY_MODE" value="显示方式"/>
+       <lanstr id="STR_MOTION_RECOGNITION" value="运动识别"/>
        <lanstr id="STR_SYSTEM" value="系统"/>
-       <lanstr id="STR_ABOUT_WATCH" value="关于手表"/>
-       <lanstr id="STR_REGULATORY_MODE" value="监管模式"/>
-       <lanstr id="STR_SWITCH_LANGUAGE" value="切换语言"/>
-       <lanstr id="STR_LANGUAGE" value="语言"/>
-       <lanstr id="STR_FACTORY_RESET" value="恢复出厂"/>
-       <lanstr id="STR_SYSTEM_UPDATE" value="系统升级"/>
        <lanstr id="STR_SHUTDOWN_AND_RESTART" value="关机和重启"/>
-       <lanstr id="STR_RESTART" value="重启"/>
-       <lanstr id="STR_SHUTDOWN" value="关机"/>
-       <lanstr id="STR_4G_CAPABILITY" value="4G能力"/>
+       <lanstr id="STR_LANGUAGE" value="语言"/>
 </language>
index 263ee97..a97bfae 100644 (file)
Binary files a/code/sdk/application/wearable/fd230app/nativeui/language/font/en.lang and b/code/sdk/application/wearable/fd230app/nativeui/language/font/en.lang differ
index 137b62e..12211a0 100644 (file)
Binary files a/code/sdk/application/wearable/fd230app/nativeui/language/font/ja.lang and b/code/sdk/application/wearable/fd230app/nativeui/language/font/ja.lang differ
index 70d6100..73166d3 100644 (file)
@@ -1,15 +1,15 @@
-/*\r
-* Copyright (c) xxxxxxxx Technologies Co., Ltd. 2021-2021. All rights reserved.\r
-* Description: language\r
-* Author: Graphic develop team\r
-* Create: 2021-07-06\r
-*/\r
-\r
-#ifndef UI_RESOURCE_STRING_H\r
-#define UI_RESOURCE_STRING_H\r
-#include <cstdint>\r
-namespace OHOS {\r
-enum UIResourceTextId : uint16_t {\r
+/*
+* Copyright (c) xxxxxxxx Technologies Co., Ltd. 2021-2021. All rights reserved.
+* Description: language
+* Author: Graphic develop team
+* Create: 2021-07-06
+*/
+
+#ifndef UI_RESOURCE_STRING_H
+#define UI_RESOURCE_STRING_H
+#include <cstdint>
+namespace OHOS {
+enum UIResourceTextId : uint16_t {
     STR_EXERCISE_GENERAL = 0,\r
     STR_EXERCISE_FREETRAINING = 1,\r
     STR_EXERCISE_RESISTANCETRAINING = 2,\r
@@ -253,53 +253,21 @@ enum UIResourceTextId : uint16_t {
     STR_INSUFFICIENT_EXERCISE_AMOUNT = 240,\r
     STR_SETTING = 241,\r
     STR_SCREEN_AND_BRIGHTNESS = 242,\r
-    STR_BRIGHTNESS_ADJUSTMENT = 243,\r
-    STR_SCREEN_ON_DURATION = 244,\r
-    STR_5_SECONDS = 245,\r
-    STR_10_SECONDS = 246,\r
-    STR_15_SECONDS = 247,\r
-    STR_30_SECONDS = 248,\r
-    STR_60_SECONDS = 249,\r
-    STR_300_SECONDS = 250,\r
-    STR_RAISE_TO_WAKE = 251,\r
-    STR_BLUETOOTH = 252,\r
-    STR_BLUETOOTH_HEADPHONES = 253,\r
-    STR_TRADITIONAL_BLUETOOTH = 254,\r
-    STR_AUTO_OFF_BLUETOOTH_NOTE = 255,\r
-    STR_SOUND_AND_VIBRATION = 256,\r
-    STR_SYSTEM_VOLUME = 257,\r
-    STR_ALARM_REMINDERS_FIND_WATCH = 258,\r
-    STR_CALL_VOLUME = 259,\r
-    STR_WATCH_CALLS = 260,\r
-    STR_MEDIA_VOLUME = 261,\r
-    STR_MUSIC_RECORDINGS_WORKOUTS = 262,\r
-    STR_VIBRATION_REMINDER = 263,\r
-    STR_SILENT_MODE = 264,\r
-    STR_SYSTEM_VOLUME_UNAFFECTED = 265,\r
-    STR_QUICK_ACCESS = 266,\r
-    STR_ACCESSIBILITY = 267,\r
-    STR_ACCESSIBILITY_BUTTON = 268,\r
-    STR_QUICK_ACCESS_APP = 269,\r
-    STR_HEART_RATE_MONITORING = 270,\r
-    STR_BLOOD_OXYGEN_MONITORING = 271,\r
-    STR_SYSTEM = 272,\r
-    STR_ABOUT_WATCH = 273,\r
-    STR_REGULATORY_MODE = 274,\r
-    STR_SWITCH_LANGUAGE = 275,\r
-    STR_LANGUAGE = 276,\r
-    STR_FACTORY_RESET = 277,\r
-    STR_SYSTEM_UPDATE = 278,\r
-    STR_SHUTDOWN_AND_RESTART = 279,\r
-    STR_RESTART = 280,\r
-    STR_SHUTDOWN = 281,\r
-    STR_4G_CAPABILITY = 282,\r
-    STR_MAX_ID = 283,\r
+    STR_NETWORKANDCALL = 243,\r
+    STR_BLUETOOTH = 244,\r
+    STR_SOUND_AND_VIBRATION = 245,\r
+    STR_DISPLAY_MODE = 246,\r
+    STR_MOTION_RECOGNITION = 247,\r
+    STR_SYSTEM = 248,\r
+    STR_SHUTDOWN_AND_RESTART = 249,\r
+    STR_LANGUAGE = 250,\r
+    STR_MAX_ID = 251,\r
 }; // UIResourceTextId\r
-\r
-enum FontLanguageId : uint8_t {\r
+
+enum FontLanguageId : uint8_t {
     LANGUAGE_ID_JA,\r
-    LANGUAGE_ID_ZH,\r
     LANGUAGE_ID_EN,\r
+    LANGUAGE_ID_ZH,\r
     LANGUAGE_ID_MAX\r
 }; // UITextLanguageTextId\r
 }\r
index b8c4591..2624d3a 100644 (file)
Binary files a/code/sdk/application/wearable/fd230app/nativeui/language/font/zh.lang and b/code/sdk/application/wearable/fd230app/nativeui/language/font/zh.lang differ
diff --git a/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionPresenter.h
new file mode 100644 (file)
index 0000000..c976098
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 17:32:20
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 17:42:37
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionPresenter.h
+ */
+#ifndef MOTION_RECOGNITION_PRESENTER_H
+#define MOTION_RECOGNITION_PRESENTER_H
+
+#include "Presenter.h"
+#include "View.h"
+
+namespace OHOS
+{
+    class MotionRecognitionView;
+    class MotionRecognitionPresenter : public Presenter<MotionRecognitionView>,
+                                       public UIView::OnClickListener,
+                                       public RootView::OnKeyActListener,
+                                       public UIView::OnDragListener
+    {
+    public:
+        MotionRecognitionPresenter();
+        virtual ~MotionRecognitionPresenter();
+
+        void OnStart() override;
+        void OnPause() override;
+        void OnResume() override;
+        void OnStop() override;
+
+        static MotionRecognitionPresenter *GetInstance();
+
+    private:
+        bool OnClick(UIView &view, const ClickEvent &event) override;
+        bool OnDrag(UIView &view, const DragEvent &event) override;
+        bool OnDragEnd(UIView &view, const DragEvent &event) override;
+        bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件
+    };
+}
+
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionView.h b/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionView.h
new file mode 100644 (file)
index 0000000..28e9bf1
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 17:29:18
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 18:03:26
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionView.h
+ */
+#ifndef MOTION_RECOGNITION_VIEW_H
+#define MOTION_RECOGNITION_VIEW_H
+
+#include "BaseView.h"
+#include "View.h"
+
+#include "components/ui_scroll_view.h"
+#include "components/ui_label_ext.h"
+#include "components/ui_image_view.h"
+#include "components/ui_toggle_button.h"
+namespace OHOS
+{
+    class MotionRecognitionPresenter;
+    class MotionRecognitionView : public View<MotionRecognitionPresenter>
+    {
+
+    public:
+        MotionRecognitionView();
+        virtual ~MotionRecognitionView();
+        static MotionRecognitionView *GetInstance(void);
+        UIToggleButton *GetMotionRecognitionToggleButton(void);
+        void OnStart() override;
+        void OnSetUpView() override;
+        void OnTearDownView() override;
+        void OnStop() override;
+
+    private:
+        void MotionRecognitionViewInit(void);
+        void ClearAll(void);
+        UIScrollView *scrollView = nullptr;
+        UILabel *Title = nullptr;
+        UIImageView *MotionRecognitionImage = nullptr;
+        UILabel *MotionRecognitionLabel = nullptr;
+        UIToggleButton *MotionRecognitionToggleButton = nullptr;
+    };
+}
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionPresenter.cpp
new file mode 100644 (file)
index 0000000..a322c4a
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-03-28 14:17:43
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 18:12:26
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/language/src/MotionRecognitionPresenter.cpp
+ */
+#include "AppViewIDs.h"
+#include "NativeAbility.h"
+#include "motionrecognition/include/MotionRecognitionPresenter.h"
+#include "motionrecognition/include/MotionRecognitionView.h"
+#include "common/key_code.h"
+#include <custom_utils.h>
+
+namespace OHOS
+{
+
+    // 当前Presenter属性实例化的内存指针
+    static MotionRecognitionPresenter *g_pMotionRecognitionPresenter = nullptr;
+
+    MotionRecognitionPresenter::MotionRecognitionPresenter()
+    {
+        g_pMotionRecognitionPresenter = this;
+    }
+
+    MotionRecognitionPresenter::~MotionRecognitionPresenter()
+    {
+        g_pMotionRecognitionPresenter = nullptr;
+    }
+
+    MotionRecognitionPresenter *MotionRecognitionPresenter::GetInstance()
+    {
+        return g_pMotionRecognitionPresenter;
+    }
+
+    void MotionRecognitionPresenter::OnStart()
+    {
+        Presenter<MotionRecognitionView>::OnStart();
+    }
+
+    void MotionRecognitionPresenter::OnPause(void)
+    {
+        Presenter<MotionRecognitionView>::OnPause();
+    }
+
+    void MotionRecognitionPresenter::OnResume(void)
+    {
+        Presenter<MotionRecognitionView>::OnResume();
+    }
+
+    void MotionRecognitionPresenter::OnStop(void)
+    {
+        Presenter<MotionRecognitionView>::OnStop();
+    }
+
+    bool MotionRecognitionPresenter::OnClick(UIView &view, const ClickEvent &event)
+    {
+        UNUSED(event);
+        MotionRecognitionView *p_MotionRecognitionView = MotionRecognitionView::GetInstance();
+        if (p_MotionRecognitionView == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " MotionRecognitionView::GetInstance() fail!");
+            return false;
+        }
+
+        UIToggleButton *toggleButton = dynamic_cast<UIToggleButton *>(&view);
+        if (p_MotionRecognitionView->GetMotionRecognitionToggleButton() == toggleButton)
+        {
+            if (toggleButton != nullptr)
+            {
+                if (toggleButton->GetState() == true)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognition is enable!");
+                }
+                else
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognition is disable!");
+                }
+            }
+        }
+
+        return true;
+    }
+
+    bool MotionRecognitionPresenter::OnDrag(UIView &view, const DragEvent &event)
+    {
+        UNUSED(view);
+        UNUSED(event);
+        return true;
+    }
+
+    bool MotionRecognitionPresenter::OnDragEnd(UIView &view, const DragEvent &event)
+    {
+        UNUSED(view);
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)
+        {
+            NativeAbility::GetInstance().Back();
+        }
+        return true;
+    }
+
+    bool MotionRecognitionPresenter::OnKeyAct(UIView &view, const KeyEvent &event) // 增加按键事件
+    {
+        UNUSED(view);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionPresenter::OnKeyAct");
+        unsigned short keyID = event.GetKeyId();
+        unsigned short keyState = event.GetState();
+        // 如果是power键,且是亮屏状态,按键释放就返回上一级
+        if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER) && keyState == 0 && uapi_get_screen_state() == 0)
+        {
+            NativeAbility::GetInstance().Back();
+        }
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionView.cpp b/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionView.cpp
new file mode 100644 (file)
index 0000000..3547c01
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 17:28:52
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 19:09:24
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionView.cpp
+ */
+#include "motionrecognition/include/MotionRecognitionPresenter.h"
+#include "motionrecognition/include/MotionRecognitionView.h"
+#include "wearable_log.h"
+namespace OHOS
+{
+
+    static MotionRecognitionView *g_pMotionRecognitionView{nullptr};
+
+    MotionRecognitionView::MotionRecognitionView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognitionView::MotionRecognitionView");
+        g_pMotionRecognitionView = this;
+    }
+
+    MotionRecognitionView::~MotionRecognitionView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognitionView::~MotionRecognitionView");
+        ClearAll();
+        g_pMotionRecognitionView = nullptr;
+    }
+
+    MotionRecognitionView *MotionRecognitionView::GetInstance()
+    {
+        return g_pMotionRecognitionView;
+    }
+
+    void MotionRecognitionView::ClearAll(void)
+    {
+        if (scrollView != nullptr)
+        {
+            scrollView->RemoveAll();
+
+            if (Title != nullptr)
+            {
+                delete Title;
+                Title = nullptr;
+            }
+
+            if (MotionRecognitionImage != nullptr)
+            {
+                delete MotionRecognitionImage;
+                MotionRecognitionImage = nullptr;
+            }
+            if (MotionRecognitionLabel != nullptr)
+            {
+                delete MotionRecognitionLabel;
+                MotionRecognitionLabel = nullptr;
+            }
+
+            if (MotionRecognitionToggleButton != nullptr)
+            {
+                delete MotionRecognitionToggleButton;
+                MotionRecognitionToggleButton = nullptr;
+            }
+
+            delete scrollView;
+            scrollView = nullptr;
+        }
+    }
+
+    void MotionRecognitionView::MotionRecognitionViewInit(void)
+    {
+
+        if (scrollView == nullptr)
+        {
+            scrollView = new UIScrollView();
+            scrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+            scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+            scrollView->SetScrollBlankSize(50);
+            scrollView->SetReboundSize(35);
+            /* -------------------------------------------------------------------------- */
+            if (Title == nullptr)
+            {
+                Title = new UILabel();
+            }
+            Title->SetPosition(83, 50, 300, 40);
+            Title->SetStyle(STYLE_TEXT_FONT, 30);
+            Title->SetStyle(STYLE_LINE_HEIGHT, 35);
+            Title->SetText("运动识别");
+            Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+            Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+            Title->SetRollSpeed(40);
+            Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            Title->SetVisible(true);
+            /* -------------------------------------------------------------------------- */
+            if (MotionRecognitionImage == nullptr)
+            {
+                MotionRecognitionImage = new UIImageView();
+            }
+            MotionRecognitionImage->SetPosition(43, 120, 380, 100);
+            MotionRecognitionImage->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+            MotionRecognitionImage->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+            MotionRecognitionImage->SetStyle(STYLE_BORDER_RADIUS, 100);
+            /* -------------------------------------------------------------------------- */
+            if (MotionRecognitionLabel == nullptr)
+            {
+                MotionRecognitionLabel = new UILabel();
+            }
+            MotionRecognitionLabel->SetPosition(90, 153, 180, 40);
+            MotionRecognitionLabel->SetStyle(STYLE_TEXT_FONT, 30);
+            MotionRecognitionLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+            MotionRecognitionLabel->SetText("自动识别");
+            MotionRecognitionLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+            MotionRecognitionLabel->SetRollSpeed(40);
+            MotionRecognitionLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            /* -------------------------------------------------------------------------- */
+            MotionRecognitionToggleButton = new UIToggleButton();
+            if (MotionRecognitionToggleButton == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::MotionRecognitionToggleButton is nullptr!");
+                return;
+            }
+            MotionRecognitionToggleButton->SetPosition(298, 145, 100, 50);
+            MotionRecognitionToggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            const char *selectedImg = "/user/res/TOGGLEBUTTON_ON.bin";
+            const char *unSelectedImg = "/user/res/TOGGLEBUTTON_OFF.bin";
+            MotionRecognitionToggleButton->SetImages(selectedImg, unSelectedImg);
+            /* ----------------------------- onclickListener ---------------------------- */
+            UIView::OnClickListener *toggleButtonClick = static_cast<UIView::OnClickListener *>(MotionRecognitionPresenter::GetInstance());
+            MotionRecognitionToggleButton->SetOnClickListener(toggleButtonClick);
+        }
+    }
+
+    void MotionRecognitionView::OnStart()
+    {
+        View<MotionRecognitionPresenter>::OnStart();
+        MotionRecognitionViewInit();
+        // 增加按键监听
+        RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::MotionRecognitionPresenter::GetInstance();
+        RootView::GetInstance()->SetOnKeyActListener(keyactListener);
+    }
+
+    void MotionRecognitionView::OnSetUpView()
+    {
+        View<MotionRecognitionPresenter>::OnSetUpView();
+        scrollView->Add(Title);
+        scrollView->Add(MotionRecognitionImage);
+        scrollView->Add(MotionRecognitionLabel);
+        scrollView->Add(MotionRecognitionToggleButton);
+        RootView::GetInstance()->Add(scrollView);
+        Draw();
+    }
+
+    void MotionRecognitionView::OnTearDownView()
+    {
+
+        View<MotionRecognitionPresenter>::OnTearDownView();
+        return;
+    }
+
+    void MotionRecognitionView::OnStop()
+    {
+
+        View<MotionRecognitionPresenter>::OnStop();
+        RootView::GetInstance()->RemoveAll();
+        RootView::GetInstance()->ClearOnKeyActListener();
+        return;
+    }
+
+    UIToggleButton *MotionRecognitionView::GetMotionRecognitionToggleButton(void)
+    {
+        return MotionRecognitionToggleButton;
+    }
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/MobileDataOptionsView.h b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/MobileDataOptionsView.h
new file mode 100644 (file)
index 0000000..691af5a
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 15:29:51
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 16:25:18
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/MobileDataOptionsView.h
+ */
+
+#ifndef MOBILE_DATA_OPTIONS_VIEW_H
+#define MOBILE_DATA_OPTIONS_VIEW_H
+
+#include "components/ui_toggle_button.h"
+#include "components/ui_scroll_view.h"
+#include "components/ui_label_ext.h"
+
+namespace OHOS
+{
+    static constexpr const char *MOBILEDATAOPTIONSVIEWID = "mobiledataoptionsview";
+    class MobileDataOptionsView
+    {
+    public:
+        MobileDataOptionsView();
+        virtual ~MobileDataOptionsView();
+        static MobileDataOptionsView *GetInstance(void);
+        UIScrollView *MobileDataOptionsViewInit(void);
+        UIToggleButton *GetSystemUpdateToggleButton(void);
+        UIToggleButton *GetOnlineMusicToggleButton(void);
+
+    private:
+        void ClearAll(void);
+        UIScrollView *scrollView{nullptr};
+        UILabelExt *Title{nullptr};
+        UIImageView *MobileDataOptionsImage[2]{nullptr};
+        UILabelExt *MobileDataOptionsImageLabel[2]{nullptr};
+        UIToggleButton *SystemUpdateToggleButton{nullptr}; // 系统更新开关:开启系统更新时闲时将安装包下载到本地并添加小红点提示
+        UIToggleButton *OnlineMusicToggleButton{nullptr};  // 在线音乐开关
+    };
+}
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallPresenter.h
new file mode 100644 (file)
index 0000000..2524b1e
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 09:59:18
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 14:44:56
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallPresenter.h
+ */
+
+#ifndef NETWORK_AND_CALL_PRESENTER_H
+#define NETWORK_AND_CALL_PRESENTER_H
+
+#include "Presenter.h"
+#include "View.h"
+
+namespace OHOS
+{
+    class NetworkAndCallView;
+    class NetworkAndCallPresenter : public Presenter<NetworkAndCallView>,
+                                    public UIView::OnClickListener,
+                                    public RootView::OnKeyActListener,
+                                    public UIView::OnDragListener
+    {
+    public:
+        NetworkAndCallPresenter();
+        virtual ~NetworkAndCallPresenter();
+
+        void OnStart() override;
+        void OnPause() override;
+        void OnResume() override;
+        void OnStop() override;
+
+        static NetworkAndCallPresenter *GetInstance();
+
+    private:
+        bool OnClick(UIView &view, const ClickEvent &event) override;
+        bool OnDrag(UIView &view, const DragEvent &event) override;
+        bool OnDragEnd(UIView &view, const DragEvent &event) override;
+        bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件
+    };
+}
+
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallView.h b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallView.h
new file mode 100644 (file)
index 0000000..9b3e1bc
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 09:57:53
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 16:24:32
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/networkandcall/include/NetworkAndCallView.h
+ */
+
+#ifndef NETWORK_AND_CALL_VIEW_H
+#define NETWORK_AND_CALL_VIEW_H
+
+#include "BaseView.h"
+#include "View.h"
+#include "components/ui_label_ext.h"
+#include "components/ui_image_view.h"
+#include "components/ui_toggle_button.h"
+#include "components/ui_scroll_view.h"
+#include "networkandcall/include/MobileDataOptionsView.h"
+
+namespace OHOS
+{
+    typedef enum
+    {
+        NETWORKANDCALLVIEW = 0,
+        MOBILEDATAOPTIONSVIEW,
+        MAX_NETWORKANDCALLVIEWID,
+    } NETWORKANDCALLVIEWID;
+
+    static constexpr const uint8_t ITEM_NUM = 3;
+
+    class NetworkAndCallPresenter;
+    class NetworkAndCallView : public View<NetworkAndCallPresenter>
+    {
+
+    public:
+        NetworkAndCallView();
+        virtual ~NetworkAndCallView();
+        static NetworkAndCallView *GetInstance(void);
+        UIToggleButton *GetVoLTEToggleButton(void);
+        UIToggleButton *GetMobileDataToggleButton(void);
+        UIImageView *GetNetworkAndCallImage(int index);
+        MobileDataOptionsView *GetMobileDataOptionsView(void);
+        bool ChangeNetworkAndCallView(int16_t thisView);
+        bool ChangeMobileDataOptionsView(int16_t thisView);
+        bool ClickFunc(int16_t interface);
+        void ChangeView(int16_t hideView, int16_t showView);
+
+        void OnStart() override;
+        void OnSetUpView() override;
+        void OnTearDownView() override;
+        void OnStop() override;
+
+    private:
+        MobileDataOptionsView *mobileDataOptionsView{nullptr};
+
+    private:
+        void NetworkAndCallViewInit(void);
+        void ClearAll(void);
+
+        UIScrollView *NetworkAndCallScrollView[MAX_NETWORKANDCALLVIEWID]{nullptr};
+        UILabelExt *Title{nullptr};
+        UIImageView *NetworkAndCallImage[ITEM_NUM]{nullptr};
+        UILabelExt *NetworkAndCallLabel[ITEM_NUM]{nullptr};
+        UIToggleButton *VoLTE_toggleButton{nullptr};      // VoLTE通话开关
+        UIToggleButton *MobileData_toggleButton{nullptr}; // 移动数据开关
+        UIImageView *NextImage{nullptr};
+    };
+}
+#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/MobileDataOptionsView.cpp b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/MobileDataOptionsView.cpp
new file mode 100644 (file)
index 0000000..60c80be
--- /dev/null
@@ -0,0 +1,169 @@
+#include "networkandcall/include/MobileDataOptionsView.h"
+#include "networkandcall/include/NetworkAndCallPresenter.h"
+#include "wearable_log.h"
+
+namespace OHOS
+{
+    static MobileDataOptionsView *g_pMobileDataOptionsView{nullptr};
+    MobileDataOptionsView::MobileDataOptionsView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MobileDataOptionsView::MobileDataOptionsView");
+        g_pMobileDataOptionsView = this;
+    }
+
+    MobileDataOptionsView::~MobileDataOptionsView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MobileDataOptionsView::~MobileDataOptionsView");
+        ClearAll();
+        g_pMobileDataOptionsView = nullptr;
+    }
+
+    MobileDataOptionsView *MobileDataOptionsView::GetInstance(void)
+    {
+        return g_pMobileDataOptionsView;
+    }
+
+    UIScrollView *MobileDataOptionsView::MobileDataOptionsViewInit(void)
+    {
+        if (scrollView == nullptr)
+        {
+            scrollView = new UIScrollView();
+            if (scrollView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::scrollView new fail!");
+                return nullptr;
+            }
+            scrollView->SetPosition(0, 0, 466, 466);
+            scrollView->SetViewId(MOBILEDATAOPTIONSVIEWID);
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(NetworkAndCallPresenter::GetInstance());
+            if (draglistener == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::draglistener can not be nullptr!");
+                return nullptr;
+            }
+            scrollView->SetOnDragListener(draglistener);
+            scrollView->SetScrollBlankSize(50);
+            scrollView->SetReboundSize(35);
+            scrollView->SetHorizontalScrollState(false);
+            scrollView->SetTouchable(true);
+            scrollView->SetDraggable(true);
+            /* ---------------------------------- Title --------------------------------- */
+            Title = new UILabelExt();
+            if (Title == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::Title is nullptr!");
+                return nullptr;
+            }
+            Title->SetPosition(83, 50, 300, 40);
+            Title->SetStyle(STYLE_TEXT_FONT, 30);
+            Title->SetStyle(STYLE_LINE_HEIGHT, 35);
+            Title->SetText("移动数据选项");
+            Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+            Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+            Title->SetRollSpeed(40);
+            Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            scrollView->Add(Title);
+            /* -------------------------------------------------------------------------- */
+            int positionY_Img = 120;
+            const char *text[] = {"系统更新", "在线音乐"};
+            for (int i = 0; i < 2; i++)
+            {
+                MobileDataOptionsImage[i] = new UIImageView(); // Create a new UIImageView for each iteration
+                if (MobileDataOptionsImage[i] == nullptr)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::MobileDataOptionsImage[%d] is nullptr!", i);
+                    return nullptr; 
+                }
+                MobileDataOptionsImage[i]->SetPosition(43, positionY_Img + (i * 120), 380, 100); // Adjust Y position based on iteration
+                MobileDataOptionsImage[i]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+                MobileDataOptionsImage[i]->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+                MobileDataOptionsImage[i]->SetStyle(STYLE_BORDER_RADIUS, 100);
+                scrollView->Add(MobileDataOptionsImage[i]);
+                /* -------------------------------------------------------------------------- */
+                MobileDataOptionsImageLabel[i] = new UILabelExt(); // Create a new UILabel for each iteration
+                if (MobileDataOptionsImageLabel[i] == nullptr)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::MobileDataOptionsImageLabel[%d] is nullptr!", i);
+                    return nullptr;
+                }
+                MobileDataOptionsImageLabel[i]->SetPosition(90, 153 + (i * 120), 180, 40); // Adjust Y position based on iteration
+                MobileDataOptionsImageLabel[i]->SetStyle(STYLE_TEXT_FONT, 30);
+                MobileDataOptionsImageLabel[i]->SetStyle(STYLE_LINE_HEIGHT, 35);
+                MobileDataOptionsImageLabel[i]->SetText(text[i]);
+                MobileDataOptionsImageLabel[i]->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+                MobileDataOptionsImageLabel[i]->SetRollSpeed(40);
+                MobileDataOptionsImageLabel[i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+                scrollView->Add(MobileDataOptionsImageLabel[i]);
+            }
+            /* -------------------------------------------------------------------------- */
+            SystemUpdateToggleButton = new UIToggleButton();
+            if (SystemUpdateToggleButton == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::SystemUpdateToggleButton is nullptr!");
+                return nullptr;
+            }
+            SystemUpdateToggleButton->SetPosition(298, 145, 100, 50);
+            SystemUpdateToggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            const char *selectedImg = "/user/res/TOGGLEBUTTON_ON.bin";
+            const char *unSelectedImg = "/user/res/TOGGLEBUTTON_OFF.bin";
+            SystemUpdateToggleButton->SetImages(selectedImg, unSelectedImg);
+            scrollView->Add(SystemUpdateToggleButton);
+            /* -------------------------------------------------------------------------- */
+            OnlineMusicToggleButton = new UIToggleButton();
+            if (OnlineMusicToggleButton == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::OnlineMusicToggleButton is nullptr!");
+                return nullptr;
+            }
+            OnlineMusicToggleButton->SetPosition(298, 265, 100, 50);
+            OnlineMusicToggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            OnlineMusicToggleButton->SetImages(selectedImg, unSelectedImg);
+            scrollView->Add(OnlineMusicToggleButton);
+            /* ----------------------------- onclickListener ---------------------------- */
+            UIView::OnClickListener *toggleButtonClick = static_cast<UIView::OnClickListener *>(NetworkAndCallPresenter::GetInstance());
+            SystemUpdateToggleButton->SetOnClickListener(toggleButtonClick);
+            OnlineMusicToggleButton->SetOnClickListener(toggleButtonClick);
+        }
+        return scrollView;
+    }
+
+    void MobileDataOptionsView::ClearAll(void)
+    {
+        if (scrollView != nullptr)
+        {
+            scrollView->RemoveAll();
+
+            delete Title;
+            Title = nullptr;
+
+            for (int i = 0; i < 2; i++)
+            {
+                delete MobileDataOptionsImage[i];
+                MobileDataOptionsImage[i] = nullptr;
+
+                delete MobileDataOptionsImageLabel[i];
+                MobileDataOptionsImageLabel[i] = nullptr;
+            }
+
+            delete SystemUpdateToggleButton;
+            SystemUpdateToggleButton = nullptr;
+
+            delete OnlineMusicToggleButton;
+            OnlineMusicToggleButton = nullptr;
+
+            delete scrollView;
+            scrollView = nullptr;
+        }
+    }
+
+    UIToggleButton *MobileDataOptionsView::GetSystemUpdateToggleButton(void)
+    {
+        return SystemUpdateToggleButton;
+    }
+    
+    UIToggleButton *MobileDataOptionsView::GetOnlineMusicToggleButton(void)
+    {
+        return OnlineMusicToggleButton;
+    }
+
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
new file mode 100644 (file)
index 0000000..c152acb
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-04-23 09:59:32
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-04-23 17:00:37
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
+ */
+#include "AppViewIDs.h"
+#include "NativeAbility.h"
+#include "networkandcall/include/NetworkAndCallPresenter.h"
+#include "common/key_code.h"
+#include <custom_utils.h>
+#include "networkandcall/include/NetworkAndCallView.h"
+#include "map"
+#include "functional"
+#include "iostream"
+
+namespace OHOS
+{
+
+    // 当前Presenter属性实例化的内存指针
+    static NetworkAndCallPresenter *g_pNetworkAndCallPresenter = nullptr;
+
+    NetworkAndCallPresenter::NetworkAndCallPresenter()
+    {
+        g_pNetworkAndCallPresenter = this;
+    }
+
+    NetworkAndCallPresenter::~NetworkAndCallPresenter()
+    {
+        g_pNetworkAndCallPresenter = nullptr;
+    }
+
+    NetworkAndCallPresenter *NetworkAndCallPresenter::GetInstance()
+    {
+        return g_pNetworkAndCallPresenter;
+    }
+
+    void NetworkAndCallPresenter::OnStart()
+    {
+        Presenter<NetworkAndCallView>::OnStart();
+    }
+
+    void NetworkAndCallPresenter::OnPause(void)
+    {
+        Presenter<NetworkAndCallView>::OnPause();
+    }
+
+    void NetworkAndCallPresenter::OnResume(void)
+    {
+        Presenter<NetworkAndCallView>::OnResume();
+    }
+
+    void NetworkAndCallPresenter::OnStop(void)
+    {
+        Presenter<NetworkAndCallView>::OnStop();
+    }
+
+    bool NetworkAndCallPresenter::OnClick(UIView &view, const ClickEvent &event)
+    {
+        UNUSED(event);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NetworkAndCallPresenter::OnClick");
+        NetworkAndCallView *p_NetworkAndCallView = NetworkAndCallView::GetInstance();
+        if (p_NetworkAndCallView == nullptr)
+        {
+            WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NetworkAndCallView::GetInstance fail!!");
+            return false;
+        }
+        
+        
+        std::map<UIView *, std::string> buttonMap = {
+            {p_NetworkAndCallView->GetVoLTEToggleButton(), "VoLTE"},
+            {p_NetworkAndCallView->GetMobileDataToggleButton(), "MobileData"},
+            {p_NetworkAndCallView->GetMobileDataOptionsView()->GetSystemUpdateToggleButton(), "SystemUpdate"},
+            {p_NetworkAndCallView->GetMobileDataOptionsView()->GetOnlineMusicToggleButton(), "OnlineMusic"}};
+
+        auto it = buttonMap.find(&view);
+        if (it != buttonMap.end())
+        {
+            UIToggleButton *toggleButton = dynamic_cast<UIToggleButton *>(&view);
+            if (toggleButton != nullptr)
+            {
+                if (toggleButton->GetState() == true)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s is enable!", it->second.c_str());
+                }
+                else
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s is disable!", it->second.c_str());
+                }
+            }
+            return true;
+        }
+
+        if (&view == p_NetworkAndCallView->GetNetworkAndCallImage(2) && p_NetworkAndCallView->GetMobileDataToggleButton()->GetState() == true)
+        {
+            p_NetworkAndCallView->ChangeView(NETWORKANDCALLVIEW, MOBILEDATAOPTIONSVIEW);
+            return true;
+        }
+
+        return false;
+    }
+
+    bool NetworkAndCallPresenter::OnDrag(UIView &view, const DragEvent &event)
+    {
+        UNUSED(view);
+        UNUSED(event);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NetworkAndCallPresenter::OnDrag");
+        return true;
+    }
+
+    bool NetworkAndCallPresenter::OnDragEnd(UIView &view, const DragEvent &event)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NetworkAndCallPresenter::OnDragEnd");
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)
+        {
+            if (strcmp(view.GetViewId(), MOBILEDATAOPTIONSVIEWID) == 0)
+            {
+                NetworkAndCallView::GetInstance()->ChangeView(MOBILEDATAOPTIONSVIEW, NETWORKANDCALLVIEW);
+            }
+            else
+            {
+                NativeAbility::GetInstance().Back();
+            }
+        }
+        return true;
+    }
+    bool NetworkAndCallPresenter::OnKeyAct(UIView &view, const KeyEvent &event) // 增加按键事件
+    {
+        UNUSED(view);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NetworkAndCallPresenter::OnKeyAct");
+        uint16_t keyID = event.GetKeyId();
+        uint16_t keyState = event.GetState();
+        // 如果是power键,且是亮屏状态,按键释放就返回上一级
+        if (keyID == static_cast<uint16_t>(ZliteKeyCode::ZLITE_KEY_POWER) && keyState == 0 && uapi_get_screen_state() == 0)
+        {
+            NativeAbility::GetInstance().Back();
+        }
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallView.cpp b/code/sdk/application/wearable/fd230app/nativeui/networkandcall/src/NetworkAndCallView.cpp
new file mode 100644 (file)
index 0000000..a72c484
--- /dev/null
@@ -0,0 +1,303 @@
+#include "networkandcall/include/NetworkAndCallPresenter.h"
+#include "networkandcall/include/NetworkAndCallView.h"
+#include "wearable_log.h"
+#include "UiConfig.h"
+namespace OHOS
+{
+
+    static NetworkAndCallView *g_pNetworkAndCallView{nullptr};
+
+    NetworkAndCallView::NetworkAndCallView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NetworkAndCallView::NetworkAndCallView");
+
+        g_pNetworkAndCallView = this;
+    }
+
+    NetworkAndCallView::~NetworkAndCallView()
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NetworkAndCallView::~NetworkAndCallView");
+        ClearAll();
+        g_pNetworkAndCallView = nullptr;
+    }
+
+    NetworkAndCallView *NetworkAndCallView::GetInstance()
+    {
+        return g_pNetworkAndCallView;
+    }
+
+    void NetworkAndCallView::ClearAll(void)
+    {
+        if (NetworkAndCallScrollView[NETWORKANDCALLVIEW] != nullptr)
+        {
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->RemoveAll();
+
+            delete Title;
+            Title = nullptr;
+
+            for (int i = 0; i < ITEM_NUM; i++)
+            {
+                delete NetworkAndCallImage[i];
+                NetworkAndCallImage[i] = nullptr;
+
+                delete NetworkAndCallLabel[i];
+                NetworkAndCallLabel[i] = nullptr;
+            }
+
+            delete VoLTE_toggleButton;
+            VoLTE_toggleButton = nullptr;
+
+            delete MobileData_toggleButton;
+            MobileData_toggleButton = nullptr;
+
+            delete NextImage;
+            NextImage = nullptr;
+
+            delete NetworkAndCallScrollView[NETWORKANDCALLVIEW];
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW] = nullptr;
+        }
+    }
+
+    void NetworkAndCallView::NetworkAndCallViewInit(void)
+    {
+        if (NetworkAndCallScrollView[NETWORKANDCALLVIEW] == nullptr)
+        {
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW] = new UIScrollView();
+            if (NetworkAndCallScrollView[NETWORKANDCALLVIEW] == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::NetworkAndCallScrollView[NETWORKANDCALLVIEW] new fail!");
+                return;
+            }
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+            UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(NetworkAndCallPresenter::GetInstance());
+            if (draglistener == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::draglistener can not be nullptr!");
+                return;
+            }
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetOnDragListener(draglistener);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetScrollBlankSize(50);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetReboundSize(35);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetHorizontalScrollState(false);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetTouchable(true);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->SetDraggable(true);
+            /* ---------------------------------- Title --------------------------------- */
+            Title = new UILabelExt();
+            if (Title == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::Title is nullptr!");
+                return;
+            }
+            Title->SetPosition(83, 50, 300, 40);
+            Title->SetStyle(STYLE_TEXT_FONT, 30);
+            Title->SetStyle(STYLE_LINE_HEIGHT, 35);
+            Title->SetText("网络与通话");
+            Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+            Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+            Title->SetRollSpeed(40);
+            Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            /* -------------------------------------------------------------------------- */
+            int positionY_Img = 120;
+            const char *text[] = {"VoLTE 通话", "移动数据", "移动数据选项"};
+            for (int i = 0; i < ITEM_NUM; i++)
+            {
+                NetworkAndCallImage[i] = new UIImageView(); // Create a new UIImageView for each iteration
+                if (NetworkAndCallImage[i] == nullptr)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::NetworkAndCallImage[%d] is nullptr!", i);
+                    return;
+                }
+                NetworkAndCallImage[i]->SetPosition(43, positionY_Img + (i * 120), 380, 100); // Adjust Y position based on iteration
+                NetworkAndCallImage[i]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+                NetworkAndCallImage[i]->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+                NetworkAndCallImage[i]->SetStyle(STYLE_BORDER_RADIUS, 100);
+                /* -------------------------------------------------------------------------- */
+                NetworkAndCallLabel[i] = new UILabelExt(); // Create a new UILabel for each iteration
+                if (NetworkAndCallLabel[i] == nullptr)
+                {
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::NetworkAndCallLabel[%d] is nullptr!", i);
+                    return;
+                }
+                NetworkAndCallLabel[i]->SetPosition(90, 153 + (i * 120), 180, 40); // Adjust Y position based on iteration
+                NetworkAndCallLabel[i]->SetStyle(STYLE_TEXT_FONT, 30);
+                NetworkAndCallLabel[i]->SetStyle(STYLE_LINE_HEIGHT, 35);
+                NetworkAndCallLabel[i]->SetText(text[i]);
+                NetworkAndCallLabel[i]->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+                // NetworkAndCallLabel[i]->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+                NetworkAndCallLabel[i]->SetRollSpeed(40);
+                NetworkAndCallLabel[i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            }
+            /* -------------------------------------------------------------------------- */
+            VoLTE_toggleButton = new UIToggleButton();
+            if (VoLTE_toggleButton == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::VoLTE_toggleButton is nullptr!");
+                return;
+            }
+            VoLTE_toggleButton->SetPosition(298, 145, 100, 50);
+            VoLTE_toggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            const char *selectedImg = "/user/res/TOGGLEBUTTON_ON.bin";
+            const char *unSelectedImg = "/user/res/TOGGLEBUTTON_OFF.bin";
+            VoLTE_toggleButton->SetImages(selectedImg, unSelectedImg);
+            /* -------------------------------------------------------------------------- */
+            MobileData_toggleButton = new UIToggleButton();
+            if (MobileData_toggleButton == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::MobileData_toggleButton is nullptr!");
+                return;
+            }
+            MobileData_toggleButton->SetPosition(298, 265, 100, 50);
+            MobileData_toggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            MobileData_toggleButton->SetImages(selectedImg, unSelectedImg);
+            /* ----------------------------- onclickListener ---------------------------- */
+            UIView::OnClickListener *toggleButtonClick = static_cast<UIView::OnClickListener *>(NetworkAndCallPresenter::GetInstance());
+            VoLTE_toggleButton->SetOnClickListener(toggleButtonClick);
+            MobileData_toggleButton->SetOnClickListener(toggleButtonClick);
+            NetworkAndCallImage[2]->SetTouchable(true);
+            NetworkAndCallImage[2]->SetOnClickListener(toggleButtonClick);
+            /* -------------------------------------------------------------------------- */
+            NextImage = new UIImageView();
+            if (NextImage == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchView::NextImage is nullptr!");
+                return;
+            }
+            NextImage->SetPosition(369, 397);
+            NextImage->SetSrc(PNG_SETTING_NEXT_IMAGE);
+        }
+    }
+
+    void NetworkAndCallView::OnStart()
+    {
+        View<NetworkAndCallPresenter>::OnStart();
+        NetworkAndCallViewInit();
+        // 增加按键监听
+        RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::NetworkAndCallPresenter::GetInstance();
+        RootView::GetInstance()->SetOnKeyActListener(keyactListener);
+    }
+
+    void NetworkAndCallView::OnSetUpView()
+    {
+        View<NetworkAndCallPresenter>::OnSetUpView();
+        NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(Title);
+        for (int i = 0; i < ITEM_NUM; i++)
+        {
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(NetworkAndCallImage[i]);
+            NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(NetworkAndCallLabel[i]);
+        }
+        NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(VoLTE_toggleButton);
+        NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(MobileData_toggleButton);
+        NetworkAndCallScrollView[NETWORKANDCALLVIEW]->Add(NextImage);
+        RootView::GetInstance()->Add(NetworkAndCallScrollView[NETWORKANDCALLVIEW]);
+        Draw();
+    }
+
+    void NetworkAndCallView::OnTearDownView()
+    {
+
+        View<NetworkAndCallPresenter>::OnTearDownView();
+        return;
+    }
+
+    void NetworkAndCallView::OnStop()
+    {
+
+        View<NetworkAndCallPresenter>::OnStop();
+        RootView::GetInstance()->RemoveAll();
+        RootView::GetInstance()->ClearOnKeyActListener();
+        return;
+    }
+
+    // 获取VOLTE button
+    UIToggleButton *NetworkAndCallView::GetVoLTEToggleButton(void)
+    {
+        return VoLTE_toggleButton;
+    }
+
+    // 获取移动数据 button
+    UIToggleButton *NetworkAndCallView::GetMobileDataToggleButton(void)
+    {
+        return MobileData_toggleButton;
+    }
+
+    UIImageView *NetworkAndCallView::GetNetworkAndCallImage(int index)
+    {
+        return NetworkAndCallImage[index];
+    }
+
+    MobileDataOptionsView *NetworkAndCallView::GetMobileDataOptionsView(void)
+    {
+        return mobileDataOptionsView;
+    }
+
+    // 切换到网络与通话视图
+    bool NetworkAndCallView::ChangeNetworkAndCallView(int16_t thisView)
+    {
+        if (NetworkAndCallScrollView[thisView] == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NetworkAndCallView::ChangeNetworkAndCallView");
+            RootView::GetInstance()->Add(NetworkAndCallScrollView[thisView]);
+        }
+        return true;
+    }
+
+    // 切换到数据选项视图
+    bool NetworkAndCallView::ChangeMobileDataOptionsView(int16_t thisView)
+    {
+        if (NetworkAndCallScrollView[thisView] == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisplayBrightnessView::ChangeScreenDurationView");
+            mobileDataOptionsView = new MobileDataOptionsView();
+            if (mobileDataOptionsView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisplayBrightnessView:: new scrollView[%d] fail", thisView);
+                return false;
+            }
+            NetworkAndCallScrollView[thisView] = mobileDataOptionsView->MobileDataOptionsViewInit();
+            RootView::GetInstance()->Add(NetworkAndCallScrollView[thisView]);
+        }
+        return true;
+    }
+
+    struct NetworkAndCallViewMapper
+    {
+        const int16_t viewId;
+        bool (NetworkAndCallView::*func)(int16_t thisView);
+    };
+
+    static const NetworkAndCallViewMapper ViewMapper[] = {
+        {NETWORKANDCALLVIEW, &NetworkAndCallView::ChangeNetworkAndCallView},
+        {MOBILEDATAOPTIONSVIEW, &NetworkAndCallView::ChangeMobileDataOptionsView},
+    };
+
+    bool NetworkAndCallView::ClickFunc(int16_t interface)
+    {
+        int funcSize = sizeof(ViewMapper) / sizeof(ViewMapper[0]);
+        for (int i = 0; i < funcSize; i++)
+        {
+            if (interface == ViewMapper[i].viewId)
+            {
+                bool jug = (this->*(ViewMapper[i].func))(interface);
+                if (jug == false)
+                {
+                    return false;
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    void NetworkAndCallView::ChangeView(int16_t hideView, int16_t showView)
+    {
+        if (hideView > MAX_NETWORKANDCALLVIEWID)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "NetworkAndCallView::ViewId Overstep ones bounds");
+            return;
+        }
+        NetworkAndCallScrollView[hideView]->SetVisible(false);
+        ClickFunc(showView);
+        NetworkAndCallScrollView[showView]->SetVisible(true);
+        Draw();
+    }
+}
\ No newline at end of file
index 85d50a1..8c17b99 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-01-29 15:37:44
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-03 09:32:07
+ * @LastEditTime: 2024-04-23 18:09:12
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItem.h
  */
 #ifndef SETTING_ITEM_H
@@ -24,6 +24,9 @@ namespace OHOS
         SETTING_ITEM_THREE,
         SETTING_ITEM_FOUR,
         SETTING_ITEM_FIVE,
+        SETTING_ITEM_SIX,
+        SETTING_ITEM_SEVEN,
+        SETTING_ITEM_MAX,
     } SettingIndex;
 
     typedef struct
index fe4c0a0..27b85ae 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-30 09:14:38
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-02 20:04:15
+ * @LastEditTime: 2024-04-23 19:24:51
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h
  */
 /*
@@ -19,6 +19,7 @@
 #include "UiConfig.h"
 #include "SettingModel.h"
 #include "components/ui_label_button_ext.h"
+#include "components/ui_label_ext.h"
 #include "components/ui_image_view.h"
 namespace OHOS
 {
@@ -34,6 +35,7 @@ namespace OHOS
     private:
         SettingItemView(const SettingItemView &);
         UIImageView Icon;
+        UILabelExt settingLabelExt;
         UILabelButtonExt settingLabelButtonExt;
         SettingItem sItemInfo = {SETTING_ITEM_ZERO, nullptr, STR_EXERCISE_GENERAL, false};
     };
index 18d64c2..89bf96f 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-30 09:14:38
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-03 09:32:37
+ * @LastEditTime: 2024-04-23 10:49:06
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingModel.h
  */
 
@@ -35,7 +35,7 @@ namespace OHOS
         SettingModel(const SettingModel &) = delete;
         SettingModel &operator=(const SettingModel &) = delete;
         virtual ~SettingModel();
-        static const uint16_t SETTING_ITEM_LEN = 6;
+        static const uint16_t SETTING_ITEM_LEN = SETTING_ITEM_MAX;
         SettingItem settings[SETTING_ITEM_LEN] = {SETTING_ITEM_ZERO, nullptr, STR_EXERCISE_GENERAL, false};
         std::map<SettingIndex, AppViewId> settingIdToViewId;
         bool btConnectStatus{false};
index 4a3b850..bf2836d 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-27 19:48:49
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-03 14:11:23
+ * @LastEditTime: 2024-04-23 19:26:32
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp
  */
 
@@ -32,12 +32,14 @@ namespace OHOS
         SetTouchable(true);
         SetUpChild();
         Add(&settingLabelButtonExt);
+        Add(&settingLabelExt);
         Add(&Icon);
     }
 
     SettingItemView::~SettingItemView()
     {
         Remove(&settingLabelButtonExt);
+        Remove(&settingLabelExt);
         Remove(&Icon);
     }
 
@@ -46,7 +48,7 @@ namespace OHOS
         sItemInfo = itemInfo;
         Icon.SetSrc(itemInfo.icon);
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d", itemInfo.textId);
-        settingLabelButtonExt.SetTextId(itemInfo.textId);
+        settingLabelExt.SetTextId(itemInfo.textId);
     }
 
     void SettingItemView::SetUpChild()
@@ -54,6 +56,13 @@ namespace OHOS
         Icon.SetPosition(SETTING_ICON_X, SETTING_SICON_Y);
         Icon.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
 
+        settingLabelExt.SetPosition(115, 33,180,100); 
+        settingLabelExt.SetStyle(STYLE_TEXT_FONT, 30);
+        settingLabelExt.SetStyle(STYLE_LINE_HEIGHT, 35);
+        settingLabelExt.SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+        settingLabelExt.SetRollSpeed(40);
+        settingLabelExt.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
         settingLabelButtonExt.SetPosition(0, 0, 380, 100);
         settingLabelButtonExt.SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
         settingLabelButtonExt.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
index 6490b17..79c3862 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-02-18 09:09:13
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-03 09:38:57
+ * @LastEditTime: 2024-04-23 18:09:47
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp
  */
 #include "SettingModel.h"
@@ -23,17 +23,21 @@ namespace OHOS
     void SettingModel::InitSettingItem()
     {
         settings[0] = {SETTING_ITEM_ZERO, PNG_SETTINGS_DISPLAY_BRIGHTNESS, STR_SCREEN_AND_BRIGHTNESS, true};
-        settings[1] = {SETTING_ITEM_ONE, PNG_SETTINGS_BLUETOOTH, STR_BLUETOOTH, true};
-        settings[2] = {SETTING_ITEM_TWO, PNG_SETTINGS_SOUND_VIBRATION, STR_SOUND_AND_VIBRATION, true};
-        settings[3] = {SETTING_ITEM_THREE, PNG_SETTINGS_SECONDARY_FUNCTION, STR_QUICK_ACCESS, true};
-        settings[4] = {SETTING_ITEM_FOUR, PNG_SETTINGS_SYSTEM, STR_SYSTEM, true};
-        settings[5] = {SETTING_ITEM_FIVE, PNG_SETTINGS_SETTINGS_POWER_CONTROL, STR_SHUTDOWN_AND_RESTART, true};
+        settings[1] = {SETTING_ITEM_ONE, PNG_SETTINGS_NETWORKANDCALL, STR_NETWORKANDCALL, true};
+        settings[2] = {SETTING_ITEM_TWO, PNG_SETTINGS_BLUETOOTH, STR_BLUETOOTH, true};
+        settings[3] = {SETTING_ITEM_THREE, PNG_SETTINGS_SOUND_VIBRATION, STR_SOUND_AND_VIBRATION, true};
+        settings[4] = {SETTING_ITEM_FOUR, PNG_SETTINGS_DISPLAY_MODE, STR_DISPLAY_MODE, true};
+        settings[5] = {SETTING_ITEM_FIVE, PNG_SETTINGS_MOTION_RECOGNITION, STR_MOTION_RECOGNITION, true};
+        settings[6] = {SETTING_ITEM_SIX, PNG_SETTINGS_SYSTEM, STR_SYSTEM, true};
+        settings[7] = {SETTING_ITEM_SEVEN, PNG_SETTINGS_SETTINGS_POWER_CONTROL, STR_SHUTDOWN_AND_RESTART, true};
         settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ZERO, VIEW_DISPLAY_BRIGHTNESS));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ONE, VIEW_CLASSIC_BLUETOOTH));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_TWO, VIEW_SOUND_VIBRATION));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_THREE, VIEW_SECONDARY_FUNCTION));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FOUR, VIEW_SYSTEM));
-        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FIVE, VIEW_SHUTDOWN_OR_REBOOT));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_ONE, VIEW_NETWORKANDCALL));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_TWO, VIEW_CLASSIC_BLUETOOTH));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_THREE, VIEW_SOUND_VIBRATION));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FOUR, VIEW_SET_DESKTOP));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_FIVE, VIEW_MOTION_RECOGNITION));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_SIX, VIEW_SYSTEM));
+        settingIdToViewId.insert(std::pair<SettingIndex, AppViewId>(SETTING_ITEM_SEVEN, VIEW_SHUTDOWN_OR_REBOOT));
     }
 
     const SettingItem *SettingModel::GetSettinglistItems() const
index 263ee97..a97bfae 100644 (file)
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang differ
index 137b62e..12211a0 100644 (file)
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ja.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ja.lang differ
index 70d6100..73166d3 100644 (file)
@@ -1,15 +1,15 @@
-/*\r
-* Copyright (c) xxxxxxxx Technologies Co., Ltd. 2021-2021. All rights reserved.\r
-* Description: language\r
-* Author: Graphic develop team\r
-* Create: 2021-07-06\r
-*/\r
-\r
-#ifndef UI_RESOURCE_STRING_H\r
-#define UI_RESOURCE_STRING_H\r
-#include <cstdint>\r
-namespace OHOS {\r
-enum UIResourceTextId : uint16_t {\r
+/*
+* Copyright (c) xxxxxxxx Technologies Co., Ltd. 2021-2021. All rights reserved.
+* Description: language
+* Author: Graphic develop team
+* Create: 2021-07-06
+*/
+
+#ifndef UI_RESOURCE_STRING_H
+#define UI_RESOURCE_STRING_H
+#include <cstdint>
+namespace OHOS {
+enum UIResourceTextId : uint16_t {
     STR_EXERCISE_GENERAL = 0,\r
     STR_EXERCISE_FREETRAINING = 1,\r
     STR_EXERCISE_RESISTANCETRAINING = 2,\r
@@ -253,53 +253,21 @@ enum UIResourceTextId : uint16_t {
     STR_INSUFFICIENT_EXERCISE_AMOUNT = 240,\r
     STR_SETTING = 241,\r
     STR_SCREEN_AND_BRIGHTNESS = 242,\r
-    STR_BRIGHTNESS_ADJUSTMENT = 243,\r
-    STR_SCREEN_ON_DURATION = 244,\r
-    STR_5_SECONDS = 245,\r
-    STR_10_SECONDS = 246,\r
-    STR_15_SECONDS = 247,\r
-    STR_30_SECONDS = 248,\r
-    STR_60_SECONDS = 249,\r
-    STR_300_SECONDS = 250,\r
-    STR_RAISE_TO_WAKE = 251,\r
-    STR_BLUETOOTH = 252,\r
-    STR_BLUETOOTH_HEADPHONES = 253,\r
-    STR_TRADITIONAL_BLUETOOTH = 254,\r
-    STR_AUTO_OFF_BLUETOOTH_NOTE = 255,\r
-    STR_SOUND_AND_VIBRATION = 256,\r
-    STR_SYSTEM_VOLUME = 257,\r
-    STR_ALARM_REMINDERS_FIND_WATCH = 258,\r
-    STR_CALL_VOLUME = 259,\r
-    STR_WATCH_CALLS = 260,\r
-    STR_MEDIA_VOLUME = 261,\r
-    STR_MUSIC_RECORDINGS_WORKOUTS = 262,\r
-    STR_VIBRATION_REMINDER = 263,\r
-    STR_SILENT_MODE = 264,\r
-    STR_SYSTEM_VOLUME_UNAFFECTED = 265,\r
-    STR_QUICK_ACCESS = 266,\r
-    STR_ACCESSIBILITY = 267,\r
-    STR_ACCESSIBILITY_BUTTON = 268,\r
-    STR_QUICK_ACCESS_APP = 269,\r
-    STR_HEART_RATE_MONITORING = 270,\r
-    STR_BLOOD_OXYGEN_MONITORING = 271,\r
-    STR_SYSTEM = 272,\r
-    STR_ABOUT_WATCH = 273,\r
-    STR_REGULATORY_MODE = 274,\r
-    STR_SWITCH_LANGUAGE = 275,\r
-    STR_LANGUAGE = 276,\r
-    STR_FACTORY_RESET = 277,\r
-    STR_SYSTEM_UPDATE = 278,\r
-    STR_SHUTDOWN_AND_RESTART = 279,\r
-    STR_RESTART = 280,\r
-    STR_SHUTDOWN = 281,\r
-    STR_4G_CAPABILITY = 282,\r
-    STR_MAX_ID = 283,\r
+    STR_NETWORKANDCALL = 243,\r
+    STR_BLUETOOTH = 244,\r
+    STR_SOUND_AND_VIBRATION = 245,\r
+    STR_DISPLAY_MODE = 246,\r
+    STR_MOTION_RECOGNITION = 247,\r
+    STR_SYSTEM = 248,\r
+    STR_SHUTDOWN_AND_RESTART = 249,\r
+    STR_LANGUAGE = 250,\r
+    STR_MAX_ID = 251,\r
 }; // UIResourceTextId\r
-\r
-enum FontLanguageId : uint8_t {\r
+
+enum FontLanguageId : uint8_t {
     LANGUAGE_ID_JA,\r
-    LANGUAGE_ID_ZH,\r
     LANGUAGE_ID_EN,\r
+    LANGUAGE_ID_ZH,\r
     LANGUAGE_ID_MAX\r
 }; // UITextLanguageTextId\r
 }\r
index b8c4591..2624d3a 100644 (file)
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_DISPLAY_MODE.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_DISPLAY_MODE.bin
new file mode 100644 (file)
index 0000000..74f2f85
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_DISPLAY_MODE.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_MOTION_RECOGNITION.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_MOTION_RECOGNITION.bin
new file mode 100644 (file)
index 0000000..ca1d2e4
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_MOTION_RECOGNITION.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_NETWORKANDCALL.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_NETWORKANDCALL.bin
new file mode 100644 (file)
index 0000000..98c8a3a
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_NETWORKANDCALL.bin differ
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_QUICK_ACCESS.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_QUICK_ACCESS.bin
deleted file mode 100644 (file)
index e09c149..0000000
Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/settings/SETTINGS_QUICK_ACCESS.bin and /dev/null differ