修改恢复出厂设置视图适配多国语言
authorluozheng <1732036298@qq.com>
Tue, 7 May 2024 02:50:16 +0000 (10:50 +0800)
committerluozheng <1732036298@qq.com>
Tue, 7 May 2024 02:50:16 +0000 (10:50 +0800)
21 files changed:
code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.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/language/include/LanguageSwitchPresenter.h
code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchView.cpp
code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h
code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemFactoryResetView.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/system/SYSTEM_UPDATE_FLAG.bin [new file with mode: 0644]

index e84666f..e6d7ae7 100644 (file)
@@ -812,6 +812,7 @@ namespace OHOS
         // Write to file as before
         WriteJsonToFile(jsonString, filePath.c_str());
         cJSON_free(jsonString);
+        return 1;
     }
 }
 
index 1ed3263..63ecdb8 100644 (file)
@@ -307,4 +307,15 @@ STR_SYSTEM_LANGUAGE$System Language
 STR_RESTART$ Restart\r
 STR_SHUTDOWN$Shutdown\r
 STR_FACTORY_RESET$Factory Reset\r
-STR_LANGUAGE$Language 
\ No newline at end of file
+STR_WATCH_NAME$Watch Name\r
+STR_FIRMWARE_VERSION$Firmware Version \r
+STR_BLUETOOTH_NAME$Bluetooth Name\r
+STR_BLUETOOTH_ADDRESS$Bluetooth Address\r
+STR_LATEST_VERSION$Latest Version\r
+STR_LATER$Later\r
+STR_UP_TO_DATE$The system has been upgraded to the latest version\r
+STR_NO_UPDATE$No update \r
+STR_LANGUAGE_SELECTION$Language Select\r
+STR_RESET_CONFIRM$Are you sure to restart?\r
+STR_SHUTDOWN_CONFIRM$Are you sure to shut down?\r
+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
index 230c811..0285deb 100644 (file)
@@ -307,4 +307,15 @@ STR_SYSTEM_LANGUAGE$系统语言
 STR_RESTART$重启\r
 STR_SHUTDOWN$关机\r
 STR_FACTORY_RESET$恢复出厂\r
-STR_LANGUAGE$语言
\ No newline at end of file
+STR_WATCH_NAME$手表名称\r
+STR_FIRMWARE_VERSION$固件版本\r
+STR_BLUETOOTH_NAME$蓝牙名称\r
+STR_BLUETOOTH_ADDRESS$蓝牙地址\r
+STR_LATEST_VERSION$最新版本\r
+STR_LATER$稍后再说\r
+STR_UP_TO_DATE$当前已升级到最新版本\r
+STR_NO_UPDATE$暂无更新\r
+STR_LANGUAGE_SELECTION$语言选择\r
+STR_RESET_CONFIRM$是否确定重新启动?\r
+STR_SHUTDOWN_CONFIRM$是否确定关机?\r
+STR_RESET_CONFIRM_NOTE$该操作会清空并重置手表数据,是否确认继续?
\ No newline at end of file
index a8fbd33..847090c 100644 (file)
        <lanstr id="STR_RESTART" value=" Restart"/>
        <lanstr id="STR_SHUTDOWN" value="Shutdown"/>
        <lanstr id="STR_FACTORY_RESET" value="Factory Reset"/>
-       <lanstr id="STR_LANGUAGE" value="Language"/>
+       <lanstr id="STR_WATCH_NAME" value="Watch Name"/>
+       <lanstr id="STR_FIRMWARE_VERSION" value="Firmware Version"/>
+       <lanstr id="STR_BLUETOOTH_NAME" value="Bluetooth Name"/>
+       <lanstr id="STR_BLUETOOTH_ADDRESS" value="Bluetooth Address"/>
+       <lanstr id="STR_LATEST_VERSION" value="Latest Version"/>
+       <lanstr id="STR_LATER" value="Later"/>
+       <lanstr id="STR_UP_TO_DATE" value="The system has been upgraded to the latest version"/>
+       <lanstr id="STR_NO_UPDATE" value="No update"/>
+       <lanstr id="STR_LANGUAGE_SELECTION" value="Language Select"/>
+       <lanstr id="STR_RESET_CONFIRM" value="Are you sure to restart?"/>
+       <lanstr id="STR_SHUTDOWN_CONFIRM" value="Are you sure to shut down?"/>
+       <lanstr id="STR_RESET_CONFIRM_NOTE" value="The operation will clear and reset the watch data. Are you sure you want to continue?"/>
 </language>
index 9b884e7..cc595a9 100644 (file)
        <lanstr id="STR_RESTART" value="重启"/>
        <lanstr id="STR_SHUTDOWN" value="关机"/>
        <lanstr id="STR_FACTORY_RESET" value="恢复出厂"/>
-       <lanstr id="STR_LANGUAGE" value="语言"/>
+       <lanstr id="STR_WATCH_NAME" value="手表名称"/>
+       <lanstr id="STR_FIRMWARE_VERSION" value="固件版本"/>
+       <lanstr id="STR_BLUETOOTH_NAME" value="蓝牙名称"/>
+       <lanstr id="STR_BLUETOOTH_ADDRESS" value="蓝牙地址"/>
+       <lanstr id="STR_LATEST_VERSION" value="最新版本"/>
+       <lanstr id="STR_LATER" value="稍后再说"/>
+       <lanstr id="STR_UP_TO_DATE" value="当前已升级到最新版本"/>
+       <lanstr id="STR_NO_UPDATE" value="暂无更新"/>
+       <lanstr id="STR_LANGUAGE_SELECTION" value="语言选择"/>
+       <lanstr id="STR_RESET_CONFIRM" value="是否确定重新启动?"/>
+       <lanstr id="STR_SHUTDOWN_CONFIRM" value="是否确定关机?"/>
+       <lanstr id="STR_RESET_CONFIRM_NOTE" value="该操作会清空并重置手表数据,是否确认继续?"/>
 </language>
index e564ebb..6626452 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 7c3cc07..de41d93 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 5bf80d1..d06ca5f 100644 (file)
@@ -320,8 +320,19 @@ enum UIResourceTextId : uint16_t {
     STR_RESTART = 307,\r
     STR_SHUTDOWN = 308,\r
     STR_FACTORY_RESET = 309,\r
-    STR_LANGUAGE = 310,\r
-    STR_MAX_ID = 311,\r
+    STR_WATCH_NAME = 310,\r
+    STR_FIRMWARE_VERSION = 311,\r
+    STR_BLUETOOTH_NAME = 312,\r
+    STR_BLUETOOTH_ADDRESS = 313,\r
+    STR_LATEST_VERSION = 314,\r
+    STR_LATER = 315,\r
+    STR_UP_TO_DATE = 316,\r
+    STR_NO_UPDATE = 317,\r
+    STR_LANGUAGE_SELECTION = 318,\r
+    STR_RESET_CONFIRM = 319,\r
+    STR_SHUTDOWN_CONFIRM = 320,\r
+    STR_RESET_CONFIRM_NOTE = 321,\r
+    STR_MAX_ID = 322,\r
 }; // UIResourceTextId\r
 
 enum FontLanguageId : uint8_t {
index 9e1c67a..fb667d5 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
index b633ab3..1c80b78 100644 (file)
@@ -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};
index 7148bba..f92a2de 100644 (file)
@@ -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);
index 30827aa..cc44e53 100644 (file)
@@ -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);
index 4335a64..f847490 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-03-30 09:14:38\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-05-06 19:09:44\r
+ * @LastEditTime: 2024-05-07 10:31:43\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemAboutTheWatchView.h\r
  */\r
 #ifndef SYSTEM_ABOUT_VIEW_H\r
@@ -34,6 +34,7 @@ namespace OHOS
             int16_t fontSize;      // 字体大小\r
             int16_t lineHeigh;     // 行高\r
             std::string text;      // 文本\r
+            uint16_t textId;      \r
             uint8_t lineBreakMode; // 断行模式。\r
         };\r
         UIScrollView *SystemAbouTheWatchtInitIView(void);\r
@@ -53,13 +54,13 @@ namespace OHOS
         UILabel *BluetoothName{nullptr};               // "蓝牙名称"\r
         UILabelExt *BluetoothAddressTitle{nullptr};    // "蓝牙地址Title"\r
         UILabel *BluetoothAddress{nullptr};            // "蓝牙地址"\r
-        UILabelExt *Network4GTitle{nullptr};           // "4G ModemTitle"\r
+        UILabel *Network4GTitle{nullptr};           // "4G ModemTitle"\r
         UILabel *Network4G{nullptr};                   // "4G Modem"\r
-        UILabelExt *PyVerTitle{nullptr};               // "pyVerTitle"\r
+        UILabel *PyVerTitle{nullptr};               // "pyVerTitle"\r
         UILabel *PyVer{nullptr};                       // "pyVer"\r
-        UILabelExt *IMELTitle{nullptr};                // "IMELTitle"\r
+        UILabel *IMELTitle{nullptr};                // "IMELTitle"\r
         UILabel *IMEL{nullptr};                        // "IMELTitle"\r
-        UILabelExt *FONTTitle = nullptr;\r
+        UILabel *FONTTitle = nullptr;\r
         UILabel *FONT = nullptr;\r
 \r
         bool initViewStatus{false};\r
index 957df83..9a6d0d9 100644 (file)
@@ -1,3 +1,10 @@
+/*\r
+ * @Author: luozheng 1732036298@qq.com\r
+ * @Date: 2024-01-29 15:37:44\r
+ * @LastEditors: luozheng 1732036298@qq.com\r
+ * @LastEditTime: 2024-05-07 09:39:01\r
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemFactoryResetView.h\r
+ */\r
 #ifndef SYSTEM_FACTORYRESET_VIEW_H\r
 #define SYSTEM_FACTORYRESET_VIEW_H\r
 \r
@@ -7,6 +14,7 @@
 #include "components/ui_image_view.h"\r
 #include "components/ui_button.h"\r
 #include "components/ui_scroll_view.h"\r
+#include "components/ui_label_ext.h"\r
 namespace OHOS\r
 {\r
     class SystemFactoryResetView\r
@@ -22,7 +30,9 @@ namespace OHOS
 \r
     private:\r
         UIScrollView *scrollView{nullptr};\r
-        UIImageView *FactoryResetImage{nullptr};       // 恢复出厂设置背景图片\r
+        UILabelExt *Title{nullptr};\r
+        UIImageView *FactoryResetImage{nullptr};\r
+        UILabelExt *FactoryResetNote{nullptr};\r
         UIButton *FactoryResetButtonCheckOn{nullptr};  // 重置确认\r
         UIButton *FactoryResetButtonCheckOff{nullptr}; // 重置否定\r
         bool initViewStatus{false};\r
index 6eed99b..50964aa 100644 (file)
@@ -128,8 +128,9 @@ namespace OHOS
         label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小\r
         label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize);                                       // 字体大小\r
         label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh);                                    // 字体行高\r
-        label->SetText(labelConfig.text.c_str());                                                     // 内容\r
-        label->SetLineBreakMode(labelConfig.lineBreakMode);                                           // 断行模式。\r
+        // label->SetText(labelConfig.text.c_str());                                                  // 内容\r
+        label->SetTextId(labelConfig.textId);\r
+        label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。\r
         label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP);\r
         label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelConfig.fontSize);\r
         return label;\r
@@ -197,7 +198,8 @@ namespace OHOS
             .height = SYSTEM_ABOUT_THEWATCH_TITLE_H,\r
             .fontSize = SYSTEM_ABOUT_THEWATCH_TITLE_FONTSIZE,\r
             .lineHeigh = SYSTEM_ABOUT_THEWATCH_TITLE_LINEHEIGHT,\r
-            .text = "关于",\r
+            .text = "关于手表",\r
+            .textId = STR_ABOUT_WATCH,\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
         SystemAboutTheWatchTitle = InitLabel_Ext(Config);\r
@@ -216,6 +218,7 @@ namespace OHOS
             .fontSize = TITLE_LABEL_FONTSIZE,\r
             .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
             .text = "手表名称",\r
+            .textId = STR_WATCH_NAME,\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
         WatchNameTitle = InitLabel_Ext(Config);\r
@@ -253,6 +256,7 @@ namespace OHOS
             .fontSize = TITLE_LABEL_FONTSIZE,\r
             .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
             .text = "固件版本",\r
+            .textId = STR_FIRMWARE_VERSION,\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
         FirmwareVersionTitle = InitLabel_Ext(Config);\r
@@ -293,6 +297,7 @@ namespace OHOS
             .fontSize = TITLE_LABEL_FONTSIZE,\r
             .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
             .text = "蓝牙名称",\r
+            .textId = STR_BLUETOOTH_NAME,\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
         BluetoothNameTitle = InitLabel_Ext(Config);\r
@@ -335,6 +340,7 @@ namespace OHOS
             .fontSize = TITLE_LABEL_FONTSIZE,\r
             .lineHeigh = TITLE_LABEL_LINEHEIGHT,\r
             .text = "蓝牙地址",\r
+            .textId = STR_BLUETOOTH_ADDRESS,\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
         BluetoothAddressTitle = InitLabel_Ext(Config);\r
@@ -381,7 +387,7 @@ namespace OHOS
             .text = "4G Modem",\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
-        Network4GTitle = InitLabel_Ext(Config);\r
+        Network4GTitle = InitLabel(Config);\r
         if (Network4GTitle == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::Network4GTitle new fail!");\r
@@ -418,7 +424,7 @@ namespace OHOS
             .text = "pyVer",\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
-        PyVerTitle = InitLabel_Ext(Config);\r
+        PyVerTitle = InitLabel(Config);\r
         if (PyVerTitle == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::PyVerTitle new fail!");\r
@@ -455,7 +461,7 @@ namespace OHOS
             .text = "IMEI",\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
-        IMELTitle = InitLabel_Ext(Config);\r
+        IMELTitle = InitLabel(Config);\r
         if (IMELTitle == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::IMELTitle new fail!");\r
@@ -492,7 +498,7 @@ namespace OHOS
             .text = "FONTS",\r
             .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,\r
         };\r
-        FONTTitle = InitLabel_Ext(Config);\r
+        FONTTitle = InitLabel(Config);\r
         if (FONTTitle == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::FONTTitle new fail!");\r
index 43f5193..8b278a1 100644 (file)
@@ -2,6 +2,7 @@
 #include "system/include/SystemPresenter.h"\r
 #include "wearable_log.h"\r
 #include "UiConfig.h"\r
+#include "language/font/ui_resource_string.h"\r
 \r
 namespace OHOS\r
 {\r
@@ -31,12 +32,22 @@ namespace OHOS
         if (initViewStatus == true)\r
         {\r
             scrollView->RemoveAll();\r
+            \r
+            delete Title;\r
+            Title =nullptr;\r
+\r
             delete FactoryResetImage;\r
             FactoryResetImage = nullptr;\r
+\r
+            delete FactoryResetNote;\r
+            FactoryResetNote = nullptr;\r
+            \r
             delete FactoryResetButtonCheckOn;\r
             FactoryResetButtonCheckOn = nullptr;\r
+            \r
             delete FactoryResetButtonCheckOff;\r
             FactoryResetButtonCheckOff = nullptr;\r
+            \r
             delete scrollView;\r
             scrollView = nullptr;\r
         }\r
@@ -53,6 +64,21 @@ namespace OHOS
         scrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());\r
         scrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);\r
         scrollView->SetStyle(STYLE_BORDER_RADIUS, 1294);\r
+        /* ---------------------------------- Title --------------------------------- */\r
+        Title = new UILabelExt();\r
+        if (Title == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new Title fail!");\r
+            return nullptr;\r
+        }\r
+        Title->SetPosition(83, 52, 300, 35);\r
+        Title->SetStyle(STYLE_TEXT_FONT, 30);\r
+        Title->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        // Title->SetText("恢复出厂");\r
+        Title->SetTextId(STR_FACTORY_RESET);\r
+        Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);\r
+        Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
         /* ---------------------------- FactoryResetImage --------------------------- */\r
         FactoryResetImage = new UIImageView();\r
         if (FactoryResetImage == nullptr)\r
@@ -60,9 +86,24 @@ namespace OHOS
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetImage fail!");\r
             return nullptr;\r
         }\r
-        FactoryResetImage->SetPosition(0, 0, 466, 466);\r
-        FactoryResetImage->SetStyle(STYLE_BORDER_RADIUS, 300);\r
-        FactoryResetImage->SetSrc("/user/res/system/factoryreset.bin"); // 恢复出厂设置\r
+        FactoryResetImage->SetPosition(193, 120);\r
+        FactoryResetImage->SetSrc(PNG_ATTENTION_IMAGE);\r
+        /* ---------------------------- FactoryResetNote ---------------------------- */\r
+        FactoryResetNote = new UILabelExt();\r
+        if (FactoryResetNote == nullptr)\r
+        {\r
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetNote fail!");\r
+            return nullptr;\r
+        }\r
+        FactoryResetNote->SetPosition(53, 228,360,70); \r
+        FactoryResetNote->SetStyle(STYLE_TEXT_FONT, 30);\r
+        FactoryResetNote->SetStyle(STYLE_LINE_HEIGHT, 35);\r
+        //FactoryResetNote->SetText("该操作会清空并重置手表数据,是否确认继续?");\r
+        FactoryResetNote->SetTextId(STR_RESET_CONFIRM_NOTE);\r
+        FactoryResetNote->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);\r
+        FactoryResetNote->SetTextColor(Color::GetColorFromRGBA(0xff, 0x8a, 0x36, 0xff));\r
+        FactoryResetNote->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
+        FactoryResetNote->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);\r
         /* ----------------------- FactoryResetButtonCheckOff ----------------------- */\r
         FactoryResetButtonCheckOff = new UIButton();\r
         if (FactoryResetButtonCheckOff == nullptr)\r
@@ -76,6 +117,7 @@ namespace OHOS
         FactoryResetButtonCheckOff->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
         FactoryResetButtonCheckOff->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
         FactoryResetButtonCheckOff->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        FactoryResetButtonCheckOff->SetImageSrc(PNG_SYSTEM_CHECK_OFF_IMAGE, PNG_SYSTEM_CHECK_OFF_IMAGE);\r
         UIView::OnClickListener *FactoryResetButtonCheckOffClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
         FactoryResetButtonCheckOff->SetOnClickListener(FactoryResetButtonCheckOffClick);\r
         /* ------------------------ FactoryResetButtonCheckOn ----------------------- */\r
@@ -91,11 +133,14 @@ namespace OHOS
         FactoryResetButtonCheckOn->SetStyle(STYLE_BACKGROUND_OPA, 0x00);\r
         FactoryResetButtonCheckOn->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);\r
         FactoryResetButtonCheckOn->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);\r
+        FactoryResetButtonCheckOn->SetImageSrc(PNG_SYSTEM_CHECK_ON_IMAGE, PNG_SYSTEM_CHECK_ON_IMAGE);\r
         UIView::OnClickListener *FactoryResetButtonCheckOnClick = static_cast<UIView::OnClickListener *>(SystemPresenter::GetInstance());\r
         FactoryResetButtonCheckOn->SetOnClickListener(FactoryResetButtonCheckOnClick);\r
 \r
         /* ----------------------------- Add to scroView ---------------------------- */\r
+        scrollView->Add(Title);\r
         scrollView->Add(FactoryResetImage);\r
+        scrollView->Add(FactoryResetNote);\r
         scrollView->Add(FactoryResetButtonCheckOff);\r
         scrollView->Add(FactoryResetButtonCheckOn);\r
         initViewStatus = true;\r
index e564ebb..6626452 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 7c3cc07..de41d93 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 5bf80d1..d06ca5f 100644 (file)
@@ -320,8 +320,19 @@ enum UIResourceTextId : uint16_t {
     STR_RESTART = 307,\r
     STR_SHUTDOWN = 308,\r
     STR_FACTORY_RESET = 309,\r
-    STR_LANGUAGE = 310,\r
-    STR_MAX_ID = 311,\r
+    STR_WATCH_NAME = 310,\r
+    STR_FIRMWARE_VERSION = 311,\r
+    STR_BLUETOOTH_NAME = 312,\r
+    STR_BLUETOOTH_ADDRESS = 313,\r
+    STR_LATEST_VERSION = 314,\r
+    STR_LATER = 315,\r
+    STR_UP_TO_DATE = 316,\r
+    STR_NO_UPDATE = 317,\r
+    STR_LANGUAGE_SELECTION = 318,\r
+    STR_RESET_CONFIRM = 319,\r
+    STR_SHUTDOWN_CONFIRM = 320,\r
+    STR_RESET_CONFIRM_NOTE = 321,\r
+    STR_MAX_ID = 322,\r
 }; // UIResourceTextId\r
 
 enum FontLanguageId : uint8_t {
index 9e1c67a..fb667d5 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/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 (file)
index 0000000..d869b14
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:deb0e9546c9f3a1d59c39d7645d89fc9608306b7c38b8c14ece8530c5689b3de
+size 344