优化星历下载的创建
authorCaisking <Casiking@zhihuishixun.com>
Thu, 12 Mar 2026 09:00:17 +0000 (17:00 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Thu, 12 Mar 2026 09:00:17 +0000 (17:00 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/ephemeris_download/include/EphemerisDownloadPresenter.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/ephemeris_download/src/EphemerisDownloadPresenter.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/ephemeris_download/src/EphemerisDownloadView.cpp

index 613cf13..4cebce4 100644 (file)
@@ -28,7 +28,9 @@ namespace OHOS
         ~EphemerisDownloadPresenter();
         EphemerisDownloadPresenter(const EphemerisDownloadPresenter &) = delete;
         EphemerisDownloadPresenter &operator=(const EphemerisDownloadPresenter &) = delete;
+        void OnStart() override;
         void OnResume() override;
+        void OnStop() override;
         bool OnClick(UIView &view, const ClickEvent &event) override;
         bool OnDrag(UIView &view, const DragEvent &event) override;
         bool OnKeyAct(UIView &view, const KeyEvent &event) override;
index 67a7a6c..9abe000 100644 (file)
@@ -32,6 +32,14 @@ EphemerisDownloadPresenter::EphemerisDownloadPresenter() {
 
 EphemerisDownloadPresenter::~EphemerisDownloadPresenter() {}
 
+void EphemerisDownloadPresenter::OnStart() {
+  WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "EphemerisDownloadPresenter::OnStart");
+}
+
+void EphemerisDownloadPresenter::OnStop() {
+  WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "EphemerisDownloadPresenter::OnStop");
+}
+
 void EphemerisDownloadPresenter::OnResume() {
   RootView::GetInstance()->SetOnKeyActListener(this);
 }
index 9b6757e..9211f16 100644 (file)
@@ -383,7 +383,7 @@ void EphemerisDownloadView::UpdateDownloadButton() {
                 btnDownload_->SetText("点击优化");
             else
                 btnDownload_->SetText("Optimize");
-            btnDownload_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Blue().full); // 蓝色
+            btnDownload_->SetStyle(STYLE_BACKGROUND_COLOR,   Color::GetColorFromRGBA(0x0d, 0x62, 0xff, 0xff).full); // 品牌蓝
             btnDownload_->SetStyleForState(STYLE_BACKGROUND_COLOR, Color::GetColorFromRGBA(0xcc, 0x70, 0x00, 0xff).full, UIButton::PRESSED);
             break;
         case EphemerisDownloadStatus::DOWNLOADING: