From: cheng Date: Tue, 27 Aug 2024 08:48:43 +0000 (+0800) Subject: 睡眠模式字符串图片资源;优化日程 X-Git-Tag: release_V1.2.70_20241020_135402~578^2^2~3 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=afe76688408ad5881c6268a9e8280136075dab26;p=mirrors%2FFD230.git 睡眠模式字符串图片资源;优化日程 --- diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h index bdb6d2da5..d67039d45 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_string.h @@ -550,12 +550,20 @@ enum UIResourceTextId : uint16_t { STR_HANG_UP_OR_ANSWER = 537, STR_WATCH_CALL = 538, STR_PHONE_CALL = 539, - STR_MAX_ID = 540, + STR_STEPS_OF_THE_DAY = 540, + STR_MILEAGE = 541, + STR_FAT_BURNING_TIME = 542, + STR_NUMBER_OF_STANDS = 543, + STR_CONSUME_CALORIES = 544, + STR_GOAL_HINT = 545, + STR_SLEEPMODE = 546, + STR_SLEEP_MODE_PROMPT_ON = 547, + STR_MAX_ID = 548, }; // UIResourceTextId enum FontLanguageId : uint8_t { - LANGUAGE_ID_EN, LANGUAGE_ID_ZH, + LANGUAGE_ID_EN, LANGUAGE_ID_MAX }; // UITextLanguageTextId } diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h index 940fb0fff..9a8417591 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h @@ -57,6 +57,7 @@ namespace OHOS private: UIViewGroup * InitNoDataScreen(); + void DeinitNoDataScreen(); UILabelExt * InitLabel(int16_t x, int16_t y, int16_t width, int16_t height, uint16_t line_height, uint8_t font_size, uint16_t text_id, uint32_t text_color); @@ -68,12 +69,14 @@ namespace OHOS UIViewGroup * InitDataScreen(); + void DeinitDataScreen(); UIViewGroup * DataGroup_{nullptr}; UIList * ScheduleList_{nullptr}; ScheduleListAdapter * ScheduleListAdapter_{nullptr}; UIScrollView * InitContentScreen(); + void DeinitContentScreen(); UIScrollView * ContentGroup_{nullptr}; UILabelExt * ContentDateLabelExt_{nullptr}; UILabelExt * ContentTopicLabelExt_{nullptr}; @@ -88,6 +91,7 @@ namespace OHOS UIViewGroup * InitDeleteScreen(); + void DeinitDeleteScreen(); UIViewGroup * DeleteGroup_{nullptr}; UILabelExt * DeleteTitleLabelExt_{nullptr}; UILabelExt * DeletePromptLabelExt_{nullptr}; diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp index 2389dbfbd..546a190f3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp @@ -81,102 +81,11 @@ namespace OHOS if (nullptr != container_) { container_->RemoveAll(); - if (nullptr != NoDataGroup_) - { - NoDataGroup_->RemoveAll(); - if (nullptr != LabelExt0_) - { - delete LabelExt0_; - LabelExt0_ = nullptr; - } - if (nullptr != ImageView_) - { - delete ImageView_; - ImageView_ = nullptr; - } - if (nullptr != LabelExt1_) - { - delete LabelExt1_; - LabelExt1_ = nullptr; - } - if (nullptr != LabelExt2_) - { - delete LabelExt2_; - LabelExt2_ = nullptr; - } - delete NoDataGroup_; - NoDataGroup_ = nullptr; - } - if (nullptr != DataGroup_) - { - DataGroup_->RemoveAll(); - if (nullptr != ScheduleListAdapter_) - { - delete ScheduleListAdapter_; - ScheduleListAdapter_ = nullptr; - } - if (nullptr != ScheduleList_) - { - delete ScheduleList_; - ScheduleList_ = nullptr; - } - - delete DataGroup_; - DataGroup_ = nullptr; - } - if(nullptr != ContentGroup_) - { - ContentGroup_->RemoveAll(); - if(nullptr != ContentDateLabelExt_) - { - delete ContentDateLabelExt_; - ContentDateLabelExt_ = nullptr; - } - if(nullptr != ContentTopicLabelExt_) - { - delete ContentTopicLabelExt_; - ContentTopicLabelExt_ = nullptr; - } - if(nullptr != ContentTopicLabelExt1_) - { - delete ContentTopicLabelExt1_; - ContentTopicLabelExt1_ = nullptr; - } - if(nullptr != ContentTimeLabelExt_) - { - delete ContentTimeLabelExt_; - ContentTimeLabelExt_ = nullptr; - } - if(nullptr != ContentTimeLabelExt1_) - { - delete ContentTimeLabelExt1_; - ContentTimeLabelExt1_ = nullptr; - } - if(nullptr != ContentContentLabelExt_) - { - delete ContentContentLabelExt_; - ContentContentLabelExt_ = nullptr; - } - if(nullptr != ContentContentLabelExt1_) - { - delete ContentContentLabelExt1_; - ContentContentLabelExt1_ = nullptr; - } - if(nullptr != ContentDeleteButton_) - { - delete ContentDeleteButton_; - ContentDeleteButton_ = nullptr; - } - if(nullptr != ContentCloseButton_) - { - delete ContentCloseButton_; - ContentCloseButton_ = nullptr; - } - - delete ContentGroup_; - ContentGroup_ = nullptr; - } + DeinitNoDataScreen(); + DeinitDataScreen(); + DeinitContentScreen(); + DeinitDeleteScreen(); delete container_; container_ = nullptr; @@ -272,6 +181,37 @@ namespace OHOS DisplaySelectScreen(ENUM_SCHEDULE_SCREEN_DELETE); } + void ScheduleView::DeinitNoDataScreen() + { + if (nullptr != NoDataGroup_) + { + NoDataGroup_->RemoveAll(); + if (nullptr != LabelExt0_) + { + delete LabelExt0_; + LabelExt0_ = nullptr; + } + if (nullptr != ImageView_) + { + delete ImageView_; + ImageView_ = nullptr; + } + if (nullptr != LabelExt1_) + { + delete LabelExt1_; + LabelExt1_ = nullptr; + } + if (nullptr != LabelExt2_) + { + delete LabelExt2_; + LabelExt2_ = nullptr; + } + + delete NoDataGroup_; + NoDataGroup_ = nullptr; + } + } + UIViewGroup * ScheduleView::InitNoDataScreen() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]", __LINE__); @@ -337,6 +277,27 @@ namespace OHOS return NoDataGroup_; } + void ScheduleView::DeinitDataScreen() + { + if (nullptr != DataGroup_) + { + DataGroup_->RemoveAll(); + if (nullptr != ScheduleListAdapter_) + { + delete ScheduleListAdapter_; + ScheduleListAdapter_ = nullptr; + } + if (nullptr != ScheduleList_) + { + delete ScheduleList_; + ScheduleList_ = nullptr; + } + + delete DataGroup_; + DataGroup_ = nullptr; + } + } + UIViewGroup * ScheduleView::InitDataScreen() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]", __LINE__); @@ -395,6 +356,62 @@ namespace OHOS return DataGroup_; } + void ScheduleView::DeinitContentScreen() + { + if(nullptr != ContentGroup_) + { + ContentGroup_->RemoveAll(); + if(nullptr != ContentDateLabelExt_) + { + delete ContentDateLabelExt_; + ContentDateLabelExt_ = nullptr; + } + if(nullptr != ContentTopicLabelExt_) + { + delete ContentTopicLabelExt_; + ContentTopicLabelExt_ = nullptr; + } + if(nullptr != ContentTopicLabelExt1_) + { + delete ContentTopicLabelExt1_; + ContentTopicLabelExt1_ = nullptr; + } + if(nullptr != ContentTimeLabelExt_) + { + delete ContentTimeLabelExt_; + ContentTimeLabelExt_ = nullptr; + } + if(nullptr != ContentTimeLabelExt1_) + { + delete ContentTimeLabelExt1_; + ContentTimeLabelExt1_ = nullptr; + } + if(nullptr != ContentContentLabelExt_) + { + delete ContentContentLabelExt_; + ContentContentLabelExt_ = nullptr; + } + if(nullptr != ContentContentLabelExt1_) + { + delete ContentContentLabelExt1_; + ContentContentLabelExt1_ = nullptr; + } + if(nullptr != ContentDeleteButton_) + { + delete ContentDeleteButton_; + ContentDeleteButton_ = nullptr; + } + if(nullptr != ContentCloseButton_) + { + delete ContentCloseButton_; + ContentCloseButton_ = nullptr; + } + + delete ContentGroup_; + ContentGroup_ = nullptr; + } + } + UIScrollView * ScheduleView::InitContentScreen() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]", __LINE__); @@ -593,6 +610,37 @@ namespace OHOS return ContentGroup_; } + void ScheduleView::DeinitDeleteScreen() + { + if(nullptr != DeleteGroup_) + { + DeleteGroup_->RemoveAll(); + if(nullptr != DeleteTitleLabelExt_) + { + delete DeleteTitleLabelExt_; + DeleteTitleLabelExt_ = nullptr; + } + if(nullptr != DeletePromptLabelExt_) + { + delete DeletePromptLabelExt_; + DeletePromptLabelExt_ = nullptr; + } + if(nullptr != DeleteCancelButton_) + { + delete DeleteCancelButton_; + DeleteCancelButton_ = nullptr; + } + if(nullptr != DeleteOKButton_) + { + delete DeleteOKButton_; + DeleteOKButton_ = nullptr; + } + + delete DeleteGroup_; + DeleteGroup_ = nullptr; + } + } + UIViewGroup * ScheduleView::InitDeleteScreen() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]", __LINE__); diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Sleepmode/sleepmode.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Sleepmode/sleepmode.bin new file mode 100644 index 000000000..10f339379 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Sleepmode/sleepmode.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c80c3e9c5e7b5479fe122d89304854ef0254a81e18cd1224b1a98243bfddf5da +size 6824 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/en.lang index a84c78cdb..65fbcaddb 100644 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 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h index bdb6d2da5..d67039d45 100644 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ui_resource_string.h @@ -550,12 +550,20 @@ enum UIResourceTextId : uint16_t { STR_HANG_UP_OR_ANSWER = 537, STR_WATCH_CALL = 538, STR_PHONE_CALL = 539, - STR_MAX_ID = 540, + STR_STEPS_OF_THE_DAY = 540, + STR_MILEAGE = 541, + STR_FAT_BURNING_TIME = 542, + STR_NUMBER_OF_STANDS = 543, + STR_CONSUME_CALORIES = 544, + STR_GOAL_HINT = 545, + STR_SLEEPMODE = 546, + STR_SLEEP_MODE_PROMPT_ON = 547, + STR_MAX_ID = 548, }; // UIResourceTextId enum FontLanguageId : uint8_t { - LANGUAGE_ID_EN, LANGUAGE_ID_ZH, + LANGUAGE_ID_EN, LANGUAGE_ID_MAX }; // UITextLanguageTextId } diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/zh.lang index f0c85b52f..1492dc254 100644 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/tools/language_tool/Language_xml/input_list_en.txt b/tools/language_tool/Language_xml/input_list_en.txt index 80e651220..d6af90618 100644 --- a/tools/language_tool/Language_xml/input_list_en.txt +++ b/tools/language_tool/Language_xml/input_list_en.txt @@ -543,4 +543,6 @@ STR_MILEAGE$Mileage (KM) STR_FAT_BURNING_TIME$Fat burning time STR_NUMBER_OF_STANDS$Number of stands STR_CONSUME_CALORIES$consume calories -STR_GOAL_HINT$For goal Settings and more data, please visit the mobile APP \ No newline at end of file +STR_GOAL_HINT$For goal Settings and more data, please visit the mobile APP +STR_SLEEPMODE$Sleep mode +STR_SLEEP_MODE_PROMPT_ON$Turn on sleep mode, and the watch will disable all reminders \ No newline at end of file diff --git a/tools/language_tool/Language_xml/input_list_zh.txt b/tools/language_tool/Language_xml/input_list_zh.txt index 00da13bfe..00a6ccf62 100644 --- a/tools/language_tool/Language_xml/input_list_zh.txt +++ b/tools/language_tool/Language_xml/input_list_zh.txt @@ -543,4 +543,6 @@ STR_MILEAGE$里程(KM) STR_FAT_BURNING_TIME$燃脂时间 STR_NUMBER_OF_STANDS$站立次数 STR_CONSUME_CALORIES$消耗卡路里 -STR_GOAL_HINT$目标设置及更多数据请前往手机APP查看 \ No newline at end of file +STR_GOAL_HINT$目标设置及更多数据请前往手机APP查看 +STR_SLEEPMODE$睡眠模式 +STR_SLEEP_MODE_PROMPT_ON$开启睡眠模式,手表将禁用所有提醒并开启睡眠监测 \ No newline at end of file diff --git a/tools/language_tool/Language_xml/language_en.xml b/tools/language_tool/Language_xml/language_en.xml index ed8e33bf1..f1ac1cf84 100644 --- a/tools/language_tool/Language_xml/language_en.xml +++ b/tools/language_tool/Language_xml/language_en.xml @@ -545,4 +545,6 @@ + + diff --git a/tools/language_tool/Language_xml/language_zh.xml b/tools/language_tool/Language_xml/language_zh.xml index 12f91878f..ae3b258b7 100644 --- a/tools/language_tool/Language_xml/language_zh.xml +++ b/tools/language_tool/Language_xml/language_zh.xml @@ -545,4 +545,6 @@ + + diff --git a/tools/language_tool/font/en.lang b/tools/language_tool/font/en.lang index a84c78cdb..65fbcaddb 100644 Binary files a/tools/language_tool/font/en.lang and b/tools/language_tool/font/en.lang differ diff --git a/tools/language_tool/font/ui_resource_string.h b/tools/language_tool/font/ui_resource_string.h index bdb6d2da5..d67039d45 100644 --- a/tools/language_tool/font/ui_resource_string.h +++ b/tools/language_tool/font/ui_resource_string.h @@ -550,12 +550,20 @@ enum UIResourceTextId : uint16_t { STR_HANG_UP_OR_ANSWER = 537, STR_WATCH_CALL = 538, STR_PHONE_CALL = 539, - STR_MAX_ID = 540, + STR_STEPS_OF_THE_DAY = 540, + STR_MILEAGE = 541, + STR_FAT_BURNING_TIME = 542, + STR_NUMBER_OF_STANDS = 543, + STR_CONSUME_CALORIES = 544, + STR_GOAL_HINT = 545, + STR_SLEEPMODE = 546, + STR_SLEEP_MODE_PROMPT_ON = 547, + STR_MAX_ID = 548, }; // UIResourceTextId enum FontLanguageId : uint8_t { - LANGUAGE_ID_EN, LANGUAGE_ID_ZH, + LANGUAGE_ID_EN, LANGUAGE_ID_MAX }; // UITextLanguageTextId } diff --git a/tools/language_tool/font/zh.lang b/tools/language_tool/font/zh.lang index f0c85b52f..1492dc254 100644 Binary files a/tools/language_tool/font/zh.lang and b/tools/language_tool/font/zh.lang differ