From: luozheng <1732036298@qq.com> Date: Tue, 7 May 2024 02:50:16 +0000 (+0800) Subject: 修改恢复出厂设置视图适配多国语言 X-Git-Tag: release_V1.2.70_20241020_135402~1113^2~19 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=e43526e3dc94b2307d63d7e89e1ea51e5afbfaec;p=mirrors%2FFD230.git 修改恢复出厂设置视图适配多国语言 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp index e84666ff2..e6d7ae706 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp @@ -812,6 +812,7 @@ namespace OHOS // Write to file as before WriteJsonToFile(jsonString, filePath.c_str()); cJSON_free(jsonString); + return 1; } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_en.txt b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_en.txt index 1ed32637b..63ecdb8d4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_en.txt +++ b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_en.txt @@ -307,4 +307,15 @@ STR_SYSTEM_LANGUAGE$System Language STR_RESTART$ Restart STR_SHUTDOWN$Shutdown STR_FACTORY_RESET$Factory Reset -STR_LANGUAGE$Language \ No newline at end of file +STR_WATCH_NAME$Watch Name +STR_FIRMWARE_VERSION$Firmware Version +STR_BLUETOOTH_NAME$Bluetooth Name +STR_BLUETOOTH_ADDRESS$Bluetooth Address +STR_LATEST_VERSION$Latest Version +STR_LATER$Later +STR_UP_TO_DATE$The system has been upgraded to the latest version +STR_NO_UPDATE$No update +STR_LANGUAGE_SELECTION$Language Select +STR_RESET_CONFIRM$Are you sure to restart? +STR_SHUTDOWN_CONFIRM$Are you sure to shut down? +STR_RESET_CONFIRM_NOTE$The operation will clear and reset the watch data. Are you sure you want to continue? \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_zh.txt b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_zh.txt index 230c8118a..0285debbc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_zh.txt +++ b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/input_list_zh.txt @@ -307,4 +307,15 @@ STR_SYSTEM_LANGUAGE$系统语言 STR_RESTART$重启 STR_SHUTDOWN$关机 STR_FACTORY_RESET$恢复出厂 -STR_LANGUAGE$语言 \ No newline at end of file +STR_WATCH_NAME$手表名称 +STR_FIRMWARE_VERSION$固件版本 +STR_BLUETOOTH_NAME$蓝牙名称 +STR_BLUETOOTH_ADDRESS$蓝牙地址 +STR_LATEST_VERSION$最新版本 +STR_LATER$稍后再说 +STR_UP_TO_DATE$当前已升级到最新版本 +STR_NO_UPDATE$暂无更新 +STR_LANGUAGE_SELECTION$语言选择 +STR_RESET_CONFIRM$是否确定重新启动? +STR_SHUTDOWN_CONFIRM$是否确定关机? +STR_RESET_CONFIRM_NOTE$该操作会清空并重置手表数据,是否确认继续? \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_en.xml b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_en.xml index a8fbd3303..847090c1f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_en.xml +++ b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_en.xml @@ -308,5 +308,16 @@ - + + + + + + + + + + + + diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_zh.xml b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_zh.xml index 9b884e705..cc595a949 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_zh.xml +++ b/code/sdk/application/wearable/fd230app/nativeui/language/Language_xml/language_zh.xml @@ -308,5 +308,16 @@ - + + + + + + + + + + + + diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/font/en.lang b/code/sdk/application/wearable/fd230app/nativeui/language/font/en.lang index e564ebbb6..6626452bd 100644 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 diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/font/ja.lang b/code/sdk/application/wearable/fd230app/nativeui/language/font/ja.lang index 7c3cc078d..de41d939f 100644 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 diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/font/ui_resource_string.h b/code/sdk/application/wearable/fd230app/nativeui/language/font/ui_resource_string.h index 5bf80d159..d06ca5f17 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/font/ui_resource_string.h +++ b/code/sdk/application/wearable/fd230app/nativeui/language/font/ui_resource_string.h @@ -320,8 +320,19 @@ enum UIResourceTextId : uint16_t { STR_RESTART = 307, STR_SHUTDOWN = 308, STR_FACTORY_RESET = 309, - STR_LANGUAGE = 310, - STR_MAX_ID = 311, + STR_WATCH_NAME = 310, + STR_FIRMWARE_VERSION = 311, + STR_BLUETOOTH_NAME = 312, + STR_BLUETOOTH_ADDRESS = 313, + STR_LATEST_VERSION = 314, + STR_LATER = 315, + STR_UP_TO_DATE = 316, + STR_NO_UPDATE = 317, + STR_LANGUAGE_SELECTION = 318, + STR_RESET_CONFIRM = 319, + STR_SHUTDOWN_CONFIRM = 320, + STR_RESET_CONFIRM_NOTE = 321, + STR_MAX_ID = 322, }; // UIResourceTextId enum FontLanguageId : uint8_t { diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/font/zh.lang b/code/sdk/application/wearable/fd230app/nativeui/language/font/zh.lang index 9e1c67a87..fb667d5de 100644 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/language/include/LanguageSwitchPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/language/include/LanguageSwitchPresenter.h index b633ab398..1c80b780a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/include/LanguageSwitchPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/language/include/LanguageSwitchPresenter.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-28 14:16:52 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-03-30 20:35:38 + * @LastEditTime: 2024-05-07 10:01:25 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/language/include/LanguageSwitchPresenter.h */ #ifndef LANGUAGE_SWITCH_PRESENTER_H @@ -40,7 +40,7 @@ namespace OHOS bool OnDragEnd(UIView &view, const DragEvent &event) override; bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件 LanguageSwitchModel *p_LanguageSwitchModel{nullptr}; - UILabelButtonExt *LabelButton[MAX_LANGUAGE]{nullptr}; + //UILabelButtonExt *LabelButton[MAX_LANGUAGE]{nullptr}; ImageInfo *NotSelectedImg; ImageInfo *SelectedImg; UILabelExt *m_labelext{nullptr}; diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp index 7148bba74..f92a2dea0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-28 14:17:43 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-30 11:27:38 + * @LastEditTime: 2024-05-07 10:02:26 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp */ #include "AppViewIDs.h" @@ -115,7 +115,7 @@ namespace OHOS else { g_planguage->ChangeLanguage(p_LanguageSwitchModel->GetCurLanguageCode()); - m_labelext->SetTextId(STR_LANGUAGE); + m_labelext->SetTextId(STR_LANGUAGE_SELECTION); m_labelext->ForceResetText(); // 强制刷新 p_UILabelButtonExt->SetImageSrc(SelectedImg, SelectedImg); diff --git a/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchView.cpp b/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchView.cpp index 30827aa93..cc44e53a2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchView.cpp @@ -94,7 +94,7 @@ namespace OHOS LanguageSwitchViewTitleLabel->SetStyle(STYLE_TEXT_FONT, TITLE_LABEL_TEXT_FONT); LanguageSwitchViewTitleLabel->SetStyle(STYLE_LINE_HEIGHT, TITLE_LABEL_LINE_HEIGHT); // LanguageSwitchViewTitleLabel->SetText("语言"); - LanguageSwitchViewTitleLabel->SetTextId(STR_LANGUAGE); + LanguageSwitchViewTitleLabel->SetTextId(STR_LANGUAGE_SELECTION); LanguageSwitchViewTitleLabel->ForceResetText(); LanguageSwitchViewTitleLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); LanguageSwitchViewTitleLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h index 4335a6445..f847490b3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 09:14:38 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-05-06 19:09:44 + * @LastEditTime: 2024-05-07 10:31:43 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h */ #ifndef SYSTEM_ABOUT_VIEW_H @@ -34,6 +34,7 @@ namespace OHOS int16_t fontSize; // 字体大小 int16_t lineHeigh; // 行高 std::string text; // 文本 + uint16_t textId; uint8_t lineBreakMode; // 断行模式。 }; UIScrollView *SystemAbouTheWatchtInitIView(void); @@ -53,13 +54,13 @@ namespace OHOS UILabel *BluetoothName{nullptr}; // "蓝牙名称" UILabelExt *BluetoothAddressTitle{nullptr}; // "蓝牙地址Title" UILabel *BluetoothAddress{nullptr}; // "蓝牙地址" - UILabelExt *Network4GTitle{nullptr}; // "4G ModemTitle" + UILabel *Network4GTitle{nullptr}; // "4G ModemTitle" UILabel *Network4G{nullptr}; // "4G Modem" - UILabelExt *PyVerTitle{nullptr}; // "pyVerTitle" + UILabel *PyVerTitle{nullptr}; // "pyVerTitle" UILabel *PyVer{nullptr}; // "pyVer" - UILabelExt *IMELTitle{nullptr}; // "IMELTitle" + UILabel *IMELTitle{nullptr}; // "IMELTitle" UILabel *IMEL{nullptr}; // "IMELTitle" - UILabelExt *FONTTitle = nullptr; + UILabel *FONTTitle = nullptr; UILabel *FONT = nullptr; bool initViewStatus{false}; diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h index 957df8377..9a6d0d9d3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h @@ -1,3 +1,10 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-01-29 15:37:44 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-05-07 09:39:01 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h + */ #ifndef SYSTEM_FACTORYRESET_VIEW_H #define SYSTEM_FACTORYRESET_VIEW_H @@ -7,6 +14,7 @@ #include "components/ui_image_view.h" #include "components/ui_button.h" #include "components/ui_scroll_view.h" +#include "components/ui_label_ext.h" namespace OHOS { class SystemFactoryResetView @@ -22,7 +30,9 @@ namespace OHOS private: UIScrollView *scrollView{nullptr}; - UIImageView *FactoryResetImage{nullptr}; // 恢复出厂设置背景图片 + UILabelExt *Title{nullptr}; + UIImageView *FactoryResetImage{nullptr}; + UILabelExt *FactoryResetNote{nullptr}; UIButton *FactoryResetButtonCheckOn{nullptr}; // 重置确认 UIButton *FactoryResetButtonCheckOff{nullptr}; // 重置否定 bool initViewStatus{false}; diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp index 6eed99b36..50964aa4f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp @@ -128,8 +128,9 @@ namespace OHOS label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小 label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize); // 字体大小 label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh); // 字体行高 - label->SetText(labelConfig.text.c_str()); // 内容 - label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 + // label->SetText(labelConfig.text.c_str()); // 内容 + label->SetTextId(labelConfig.textId); + label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize); return label; @@ -197,7 +198,8 @@ namespace OHOS .height = SYSTEM_ABOUT_THEWATCH_TITLE_H, .fontSize = SYSTEM_ABOUT_THEWATCH_TITLE_FONTSIZE, .lineHeigh = SYSTEM_ABOUT_THEWATCH_TITLE_LINEHEIGHT, - .text = "关于", + .text = "关于手表", + .textId = STR_ABOUT_WATCH, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; SystemAboutTheWatchTitle = InitLabel_Ext(Config); @@ -216,6 +218,7 @@ namespace OHOS .fontSize = TITLE_LABEL_FONTSIZE, .lineHeigh = TITLE_LABEL_LINEHEIGHT, .text = "手表名称", + .textId = STR_WATCH_NAME, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; WatchNameTitle = InitLabel_Ext(Config); @@ -253,6 +256,7 @@ namespace OHOS .fontSize = TITLE_LABEL_FONTSIZE, .lineHeigh = TITLE_LABEL_LINEHEIGHT, .text = "固件版本", + .textId = STR_FIRMWARE_VERSION, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; FirmwareVersionTitle = InitLabel_Ext(Config); @@ -293,6 +297,7 @@ namespace OHOS .fontSize = TITLE_LABEL_FONTSIZE, .lineHeigh = TITLE_LABEL_LINEHEIGHT, .text = "蓝牙名称", + .textId = STR_BLUETOOTH_NAME, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; BluetoothNameTitle = InitLabel_Ext(Config); @@ -335,6 +340,7 @@ namespace OHOS .fontSize = TITLE_LABEL_FONTSIZE, .lineHeigh = TITLE_LABEL_LINEHEIGHT, .text = "蓝牙地址", + .textId = STR_BLUETOOTH_ADDRESS, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; BluetoothAddressTitle = InitLabel_Ext(Config); @@ -381,7 +387,7 @@ namespace OHOS .text = "4G Modem", .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; - Network4GTitle = InitLabel_Ext(Config); + Network4GTitle = InitLabel(Config); if (Network4GTitle == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::Network4GTitle new fail!"); @@ -418,7 +424,7 @@ namespace OHOS .text = "pyVer", .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; - PyVerTitle = InitLabel_Ext(Config); + PyVerTitle = InitLabel(Config); if (PyVerTitle == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::PyVerTitle new fail!"); @@ -455,7 +461,7 @@ namespace OHOS .text = "IMEI", .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; - IMELTitle = InitLabel_Ext(Config); + IMELTitle = InitLabel(Config); if (IMELTitle == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::IMELTitle new fail!"); @@ -492,7 +498,7 @@ namespace OHOS .text = "FONTS", .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; - FONTTitle = InitLabel_Ext(Config); + FONTTitle = InitLabel(Config); if (FONTTitle == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::FONTTitle new fail!"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemFactoryResetView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemFactoryResetView.cpp index 43f5193c6..8b278a158 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemFactoryResetView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemFactoryResetView.cpp @@ -2,6 +2,7 @@ #include "system/include/SystemPresenter.h" #include "wearable_log.h" #include "UiConfig.h" +#include "language/font/ui_resource_string.h" namespace OHOS { @@ -31,12 +32,22 @@ namespace OHOS if (initViewStatus == true) { scrollView->RemoveAll(); + + delete Title; + Title =nullptr; + delete FactoryResetImage; FactoryResetImage = nullptr; + + delete FactoryResetNote; + FactoryResetNote = nullptr; + delete FactoryResetButtonCheckOn; FactoryResetButtonCheckOn = nullptr; + delete FactoryResetButtonCheckOff; FactoryResetButtonCheckOff = nullptr; + delete scrollView; scrollView = nullptr; } @@ -53,6 +64,21 @@ namespace OHOS scrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); scrollView->SetStyle(STYLE_BORDER_RADIUS, 1294); + /* ---------------------------------- Title --------------------------------- */ + Title = new UILabelExt(); + if (Title == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new Title fail!"); + return nullptr; + } + Title->SetPosition(83, 52, 300, 35); + Title->SetStyle(STYLE_TEXT_FONT, 30); + Title->SetStyle(STYLE_LINE_HEIGHT, 35); + // Title->SetText("恢复出厂"); + Title->SetTextId(STR_FACTORY_RESET); + Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); + Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); /* ---------------------------- FactoryResetImage --------------------------- */ FactoryResetImage = new UIImageView(); if (FactoryResetImage == nullptr) @@ -60,9 +86,24 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetImage fail!"); return nullptr; } - FactoryResetImage->SetPosition(0, 0, 466, 466); - FactoryResetImage->SetStyle(STYLE_BORDER_RADIUS, 300); - FactoryResetImage->SetSrc("/user/res/system/factoryreset.bin"); // 恢复出厂设置 + FactoryResetImage->SetPosition(193, 120); + FactoryResetImage->SetSrc(PNG_ATTENTION_IMAGE); + /* ---------------------------- FactoryResetNote ---------------------------- */ + FactoryResetNote = new UILabelExt(); + if (FactoryResetNote == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetNote fail!"); + return nullptr; + } + FactoryResetNote->SetPosition(53, 228,360,70); + FactoryResetNote->SetStyle(STYLE_TEXT_FONT, 30); + FactoryResetNote->SetStyle(STYLE_LINE_HEIGHT, 35); + //FactoryResetNote->SetText("该操作会清空并重置手表数据,是否确认继续?"); + FactoryResetNote->SetTextId(STR_RESET_CONFIRM_NOTE); + FactoryResetNote->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); + FactoryResetNote->SetTextColor(Color::GetColorFromRGBA(0xff, 0x8a, 0x36, 0xff)); + FactoryResetNote->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + FactoryResetNote->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); /* ----------------------- FactoryResetButtonCheckOff ----------------------- */ FactoryResetButtonCheckOff = new UIButton(); if (FactoryResetButtonCheckOff == nullptr) @@ -76,6 +117,7 @@ namespace OHOS FactoryResetButtonCheckOff->SetStyle(STYLE_BACKGROUND_OPA, 0x00); FactoryResetButtonCheckOff->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED); FactoryResetButtonCheckOff->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); + FactoryResetButtonCheckOff->SetImageSrc(PNG_SYSTEM_CHECK_OFF_IMAGE, PNG_SYSTEM_CHECK_OFF_IMAGE); UIView::OnClickListener *FactoryResetButtonCheckOffClick = static_cast(SystemPresenter::GetInstance()); FactoryResetButtonCheckOff->SetOnClickListener(FactoryResetButtonCheckOffClick); /* ------------------------ FactoryResetButtonCheckOn ----------------------- */ @@ -91,11 +133,14 @@ namespace OHOS FactoryResetButtonCheckOn->SetStyle(STYLE_BACKGROUND_OPA, 0x00); FactoryResetButtonCheckOn->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED); FactoryResetButtonCheckOn->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); + FactoryResetButtonCheckOn->SetImageSrc(PNG_SYSTEM_CHECK_ON_IMAGE, PNG_SYSTEM_CHECK_ON_IMAGE); UIView::OnClickListener *FactoryResetButtonCheckOnClick = static_cast(SystemPresenter::GetInstance()); FactoryResetButtonCheckOn->SetOnClickListener(FactoryResetButtonCheckOnClick); /* ----------------------------- Add to scroView ---------------------------- */ + scrollView->Add(Title); scrollView->Add(FactoryResetImage); + scrollView->Add(FactoryResetNote); scrollView->Add(FactoryResetButtonCheckOff); scrollView->Add(FactoryResetButtonCheckOn); initViewStatus = true; 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 e564ebbb6..6626452bd 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/ja.lang b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font/ja.lang index 7c3cc078d..de41d939f 100644 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 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 5bf80d159..d06ca5f17 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 @@ -320,8 +320,19 @@ enum UIResourceTextId : uint16_t { STR_RESTART = 307, STR_SHUTDOWN = 308, STR_FACTORY_RESET = 309, - STR_LANGUAGE = 310, - STR_MAX_ID = 311, + STR_WATCH_NAME = 310, + STR_FIRMWARE_VERSION = 311, + STR_BLUETOOTH_NAME = 312, + STR_BLUETOOTH_ADDRESS = 313, + STR_LATEST_VERSION = 314, + STR_LATER = 315, + STR_UP_TO_DATE = 316, + STR_NO_UPDATE = 317, + STR_LANGUAGE_SELECTION = 318, + STR_RESET_CONFIRM = 319, + STR_SHUTDOWN_CONFIRM = 320, + STR_RESET_CONFIRM_NOTE = 321, + STR_MAX_ID = 322, }; // UIResourceTextId enum FontLanguageId : uint8_t { 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 9e1c67a87..fb667d5de 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/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/system/SYSTEM_UPDATE_FLAG.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/system/SYSTEM_UPDATE_FLAG.bin new file mode 100644 index 000000000..d869b1493 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/system/SYSTEM_UPDATE_FLAG.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:deb0e9546c9f3a1d59c39d7645d89fc9608306b7c38b8c14ece8530c5689b3de +size 344