From: luozheng <1732036298@qq.com> Date: Tue, 7 May 2024 12:13:03 +0000 (+0800) Subject: 增加系统更新icon显示 X-Git-Tag: release_V1.2.70_20241020_135402~1025^2~16^2~3 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=d0340ce4b8e586e144b87a262f82cfab79003308;p=mirrors%2FFD230.git 增加系统更新icon显示 --- 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 63ecdb8d4..1ca2afaa7 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 @@ -312,6 +312,7 @@ STR_FIRMWARE_VERSION$Firmware Version STR_BLUETOOTH_NAME$Bluetooth Name STR_BLUETOOTH_ADDRESS$Bluetooth Address STR_LATEST_VERSION$Latest Version +STR_UPDATENOW$Update Now STR_LATER$Later STR_UP_TO_DATE$The system has been upgraded to the latest version STR_NO_UPDATE$No update 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 0285debbc..1e8f5046a 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 @@ -312,6 +312,7 @@ STR_FIRMWARE_VERSION$固件版本 STR_BLUETOOTH_NAME$蓝牙名称 STR_BLUETOOTH_ADDRESS$蓝牙地址 STR_LATEST_VERSION$最新版本 +STR_UPDATENOW$立即更新 STR_LATER$稍后再说 STR_UP_TO_DATE$当前已升级到最新版本 STR_NO_UPDATE$暂无更新 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 847090c1f..16fa0a6db 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 @@ -313,6 +313,7 @@ + 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 cc595a949..40e2fdef1 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 @@ -313,6 +313,7 @@ + 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 6626452bd..dd43c50a2 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 de41d939f..4ef0188ca 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 d06ca5f17..5a240cc45 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 @@ -325,14 +325,15 @@ enum UIResourceTextId : uint16_t { 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, + STR_UPDATENOW = 315, + STR_LATER = 316, + STR_UP_TO_DATE = 317, + STR_NO_UPDATE = 318, + STR_LANGUAGE_SELECTION = 319, + STR_RESET_CONFIRM = 320, + STR_SHUTDOWN_CONFIRM = 321, + STR_RESET_CONFIRM_NOTE = 322, + STR_MAX_ID = 323, }; // 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 fb667d5de..54f4f9f5c 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/settings/include/SettingItemView.h b/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h index 27b85ae82..ed09a0d78 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 09:14:38 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-23 19:24:51 + * @LastEditTime: 2024-05-07 20:06:31 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h */ /* @@ -31,6 +31,7 @@ namespace OHOS virtual void SetItemInfo(const SettingItem itemInfo); virtual void SetUpChild(); SettingIndex GetSettingIndex(); + UIImageView *GetNeedToUpdateImage(void); private: SettingItemView(const SettingItemView &); @@ -38,6 +39,10 @@ namespace OHOS UILabelExt settingLabelExt; UILabelButtonExt settingLabelButtonExt; SettingItem sItemInfo = {SETTING_ITEM_ZERO, nullptr, STR_EXERCISE_GENERAL, false}; + /* -------------------------------------------------------------------------- */ + void NeedToUpdateImageinit(void); + UIImageView NeedToUpdateImage; //提示需要系统更新的icon图片 + /* -------------------------------------------------------------------------- */ }; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingAdapter.cpp b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingAdapter.cpp index fab02631d..5ee43375d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingAdapter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingAdapter.cpp @@ -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 14:11:14 + * @LastEditTime: 2024-05-07 20:11:17 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingAdapter.cpp */ #include "SettingAdapter.h" @@ -35,7 +35,7 @@ namespace OHOS UIView *SettingAdapter::GetView(UIView *inView, int16_t index) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingAdapter::GetView:%d",index); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SettingAdapter::GetView:%d", index); if (listData.empty()) { return nullptr; @@ -68,6 +68,15 @@ namespace OHOS item->SetItemInfo(itemData); item->SetOnClickListener(itemClickListener); + UIImageView *view = dynamic_cast(item->GetNeedToUpdateImage()); + if (view != nullptr && index == 6) + { + item->GetNeedToUpdateImage()->SetVisible(true); + } + else + { + item->GetNeedToUpdateImage()->SetVisible(false); + } return item; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp index e37684baa..901e69490 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp @@ -2,14 +2,14 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-27 19:48:49 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-24 16:19:53 + * @LastEditTime: 2024-05-07 20:03:34 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp */ #include "wearable_log.h" #include "SettingItemView.h" #include "common/image_cache_manager.h" - +#include "systemupdate/include/SystemUpdateModel.h" namespace OHOS { static constexpr int16_t SETTING_ICON_X = 19; @@ -46,9 +46,10 @@ namespace OHOS SettingItemView::~SettingItemView() { - Remove(&settingLabelButtonExt); - Remove(&settingLabelExt); - Remove(&Icon); + // Remove(&settingLabelButtonExt); + // Remove(&settingLabelExt); + // Remove(&Icon); + RemoveAll(); } void SettingItemView::SetItemInfo(const SettingItem itemInfo) @@ -57,6 +58,11 @@ namespace OHOS Icon.SetSrc(itemInfo.icon); //WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d", itemInfo.textId); settingLabelExt.SetTextId(itemInfo.textId); + + if (itemInfo.textId == STR_SYSTEM && SystemUpdateModel::GetInstance().IsLatestVersion() == false) // 如果不是最新系统版本出现小圆点 + { + NeedToUpdateImageinit(); + } } void SettingItemView::SetUpChild() @@ -91,4 +97,20 @@ namespace OHOS { return sItemInfo.index; } + + void SettingItemView::NeedToUpdateImageinit(void) + { + NeedToUpdateImage.SetPosition(280, 40, 20, 20); + NeedToUpdateImage.SetStyle(STYLE_BORDER_RADIUS, 200); + char *imagesPath = "/user/res/system/SYSTEM_UPDATE_FLAG.bin"; + NeedToUpdateImage.SetSrc(imagesPath); + NeedToUpdateImage.SetVisible(false); + + Add(&NeedToUpdateImage); + } + + UIImageView *SettingItemView::GetNeedToUpdateImage(void) + { + return &NeedToUpdateImage; + } } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemView.h b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemView.h index b00cafc60..83d809335 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 18:29:39 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-05-06 20:35:44 + * @LastEditTime: 2024-05-07 18:30:05 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/system/include/SystemView.h */ #ifndef SYSTEM_VIEW_H @@ -78,6 +78,7 @@ namespace OHOS void ClearAll(void); bool SetTheSystemScrollView(void); bool SetTheTitle(void); + void NeedToUpdateImageinit(void); UILabelButtonExt *SetTheButton_ext(ButtonConfig_ext_t &ButtonConfig_ext, UIView::OnClickListener *clickListener); SystemAboutTheWatchView *p_SystemAboutTheWatchView{nullptr}; // 关于手表 SystemupgradeView *p_SystemupgradeView{nullptr}; // 系统升级 @@ -86,6 +87,9 @@ namespace OHOS UIScrollView *SystemScrollView[10]{nullptr}; UILabelExt *Title{nullptr}; // 标题 UILabelButtonExt *SystemViewButton[5]{nullptr}; + /* -------------------------------------------------------------------------- */ + UIImageView *NeedToUpdateImage{nullptr}; //提示需要系统更新的icon图片 + /* -------------------------------------------------------------------------- */ }; } // namespace OHOS diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp index 88384fca8..e5e1e0b17 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp @@ -5,6 +5,7 @@ #include "battery_hal.h" #include "language/font/ui_resource_string.h" extern uint8_t battery_get_voltage(float *voltage); +#include "systemupdate/include/SystemUpdateModel.h" namespace OHOS { @@ -121,6 +122,12 @@ namespace OHOS p_SystemFactoryResetView = nullptr; } + if (NeedToUpdateImage != nullptr) + { + delete NeedToUpdateImage; + NeedToUpdateImage = nullptr; + } + delete SystemScrollView[SYSTEMVIEW]; SystemScrollView[SYSTEMVIEW] = nullptr; } @@ -340,6 +347,25 @@ namespace OHOS return SystemScrollView[ViewId]; } + void SystemView::NeedToUpdateImageinit(void) + { + if (NeedToUpdateImage == nullptr) + { + NeedToUpdateImage = new UIImageView(); + if (NeedToUpdateImage == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemView"); + return; + } + NeedToUpdateImage->SetPosition(323, 280, 20, 20); + NeedToUpdateImage->SetStyle(STYLE_BORDER_RADIUS, 200); + char *imagesPath = "/user/res/system/SYSTEM_UPDATE_FLAG.bin"; + NeedToUpdateImage->SetSrc(imagesPath); + + SystemScrollView[SYSTEMVIEW]->Add(NeedToUpdateImage); + } + } + void SystemView::OnStart() { View::OnStart(); @@ -364,6 +390,10 @@ namespace OHOS { SystemScrollView[SYSTEMVIEW]->Add(SystemViewButton[i]); } + if (SystemUpdateModel::GetInstance().IsLatestVersion() == false) // 如果不是最新系统版本出现小圆点 + { + NeedToUpdateImageinit(); + } RootView::GetInstance()->Add(SystemScrollView[SYSTEMVIEW]); Draw(); } diff --git a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/include/SystemUpdateView.h b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/include/SystemUpdateView.h index bf1cc7d98..af5307d95 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/include/SystemUpdateView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/include/SystemUpdateView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-05-07 11:25:27 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-05-07 16:13:06 + * @LastEditTime: 2024-05-07 18:10:03 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/systemupdate/include/SystemUpdateView.h */ @@ -51,6 +51,7 @@ namespace OHOS bool SetSystemUpdateScrollView(void); UILabelExt *InitLabel_Ext(LabelConfig &labelConfig); void SystemUpdateViewInit(void); + void NoNeedUpdateViewInit(void); void ClearAll(void); UIScrollView *SystemUpdateScrollView{nullptr}; @@ -62,6 +63,11 @@ namespace OHOS UILabelExt *TryAgainLaterLabel{nullptr}; // 稍后再试标签 UIButton *UpdateNowButtton{nullptr}; // 立即升级按钮 UIButton *TryAgainLaterButton{nullptr}; // 稍后再试按钮 + /* -------------------------------------------------------------------------- */ + UIScrollView *NoNeedUpdateScrollView{nullptr}; + UILabelExt *NoNeedUpdateTitle{nullptr}; + UILabelExt *NoNeedUpdateNote[2]{nullptr}; + /* -------------------------------------------------------------------------- */ }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateModel.cpp index 2ed512c65..17fed699e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-05-07 11:26:25 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-05-07 16:32:26 + * @LastEditTime: 2024-05-07 18:10:26 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateModel.cpp */ #include "systemupdate/include/SystemUpdateModel.h" diff --git a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp index 638f51a22..8c6d24773 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-05-07 11:25:58 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-05-07 17:15:10 + * @LastEditTime: 2024-05-07 18:03:07 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp */ @@ -69,6 +69,23 @@ namespace OHOS delete SystemUpdateScrollView; SystemUpdateScrollView = nullptr; } + + if (NoNeedUpdateScrollView != nullptr) + { + NoNeedUpdateScrollView->RemoveAll(); + + delete NoNeedUpdateTitle; + NoNeedUpdateTitle = nullptr; + + for (int i = 0; i < 2; i++) + { + delete NoNeedUpdateNote[i]; + NoNeedUpdateNote[i] = nullptr; + } + + delete NoNeedUpdateScrollView; + NoNeedUpdateScrollView = nullptr; + } } UILabelExt *SystemUpdateView::InitLabel_Ext(LabelConfig &labelConfig) @@ -189,7 +206,7 @@ namespace OHOS .height = 35, .fontSize = 30, .lineHeigh = 35, - .textId = STR_LATEST_VERSION, + .textId = STR_UPDATENOW, .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, }; UpdateNowLabel = InitLabel_Ext(Config); @@ -235,7 +252,7 @@ namespace OHOS TryAgainLaterButton->SetPosition(63, 427, 340, 100); TryAgainLaterButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); TryAgainLaterButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); - + TryAgainLaterButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED); /* ----------------------------- OnClickListener ---------------------------- */ UIView::OnClickListener *listener = static_cast(SystemUpdatePresenter::GetInstance()); if (listener == nullptr) @@ -251,20 +268,91 @@ namespace OHOS SystemUpdateScrollView->Add(KUMILOGOImage); SystemUpdateScrollView->Add(LatestVersionLabel); SystemUpdateScrollView->Add(VersionIdLabel); - SystemUpdateScrollView->Add(UpdateNowLabel); - SystemUpdateScrollView->Add(TryAgainLaterLabel); SystemUpdateScrollView->Add(UpdateNowButtton); SystemUpdateScrollView->Add(TryAgainLaterButton); + SystemUpdateScrollView->Add(UpdateNowLabel); + SystemUpdateScrollView->Add(TryAgainLaterLabel); RootView::GetInstance()->Add(SystemUpdateScrollView); } + void SystemUpdateView::NoNeedUpdateViewInit(void) + { + if (NoNeedUpdateScrollView == nullptr) + { + NoNeedUpdateScrollView = new UIScrollView(); + if (NoNeedUpdateScrollView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::NoNeedUpdateScrollView new fail!"); + return; + } + NoNeedUpdateScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); + NoNeedUpdateScrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); + NoNeedUpdateScrollView->SetStyle(STYLE_BORDER_RADIUS, 1294); + NoNeedUpdateScrollView->SetScrollBlankSize(35); + NoNeedUpdateScrollView->SetReboundSize(50); + NoNeedUpdateScrollView->SetDirection(1); + UIView::OnDragListener *draglistener = static_cast(SystemUpdatePresenter::GetInstance()); + if (draglistener == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::draglistener can not be nullptr!"); + return; + } + NoNeedUpdateScrollView->SetOnDragListener(draglistener); + NoNeedUpdateScrollView->SetTouchable(true); + NoNeedUpdateScrollView->SetDraggable(true); + } + /* -------------------------------------------------------------------------- */ + LabelConfig Config = { + .left = 83, + .top = 52, + .width = 300, + .height = 35, + .fontSize = 30, + .lineHeigh = 35, + //.text = "系统", + .textId = STR_SYSTEM, + .lineBreakMode = UILabel::LINE_BREAK_MARQUEE, + }; + NoNeedUpdateTitle = InitLabel_Ext(Config); + if (NoNeedUpdateTitle == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemUpdateView::NoNeedUpdateTitle new fail!"); + return; + } + NoNeedUpdateScrollView->Add(NoNeedUpdateTitle); + /* -------------------------------------------------------------------------- */ + for (int i = 0; i < 2; i++) + { + if (NoNeedUpdateNote[i] == nullptr) + { + NoNeedUpdateNote[i] = new UILabelExt(); + if (NoNeedUpdateNote[i] == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView:: NoNeedUpdateNote[%d] can not be nullptr!", i); + return; + } + uint16_t textId = i ? STR_UP_TO_DATE : STR_NO_UPDATE; + uint16_t posY = i ? 227 : 262; + NoNeedUpdateNote[i]->SetPosition(33, posY, 400, 35); + NoNeedUpdateNote[i]->SetTextId(textId); + NoNeedUpdateNote[i]->SetStyle(STYLE_TEXT_FONT, 30); + NoNeedUpdateNote[i]->SetStyle(STYLE_LINE_HEIGHT, 35); + NoNeedUpdateNote[i]->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); + NoNeedUpdateNote[i]->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + NoNeedUpdateNote[i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + } + NoNeedUpdateScrollView->Add(NoNeedUpdateNote[i]); + } + RootView::GetInstance()->Add(NoNeedUpdateScrollView); + } + void SystemUpdateView::OnStart() { View::OnStart(); - if (SystemUpdateModel::GetInstance().IsLatestVersion() == true) //如果是最新版本显示不需要更新界面 + if (SystemUpdateModel::GetInstance().IsLatestVersion() == true) // 如果是最新版本显示不需要更新界面 { - + NoNeedUpdateViewInit(); } else { 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 6626452bd..dd43c50a2 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 de41d939f..4ef0188ca 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 d06ca5f17..5a240cc45 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 @@ -325,14 +325,15 @@ enum UIResourceTextId : uint16_t { 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, + STR_UPDATENOW = 315, + STR_LATER = 316, + STR_UP_TO_DATE = 317, + STR_NO_UPDATE = 318, + STR_LANGUAGE_SELECTION = 319, + STR_RESET_CONFIRM = 320, + STR_SHUTDOWN_CONFIRM = 321, + STR_RESET_CONFIRM_NOTE = 322, + STR_MAX_ID = 323, }; // 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 fb667d5de..54f4f9f5c 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