Merge #3328 into fd272 from refs/changes/3328/head 3332/target/1
author袁清梦 <3449750381@qq.com>
Thu, 2 Apr 2026 10:33:26 +0000 (10:33 +0000)
committeraliyun3243248791 <accounts_67aaf52ad497cd558d73ac32@mail.teambition.com>
Thu, 2 Apr 2026 10:33:26 +0000 (10:33 +0000)
优化活动界面

* refs/changes/3328/head: (1 commits squashed)

  - 优化活动界面

Signed-off-by: Caisking <3449750381@qq.com>
Merged-by: 薛文强 <accounts_67aaf52ad497cd558d73ac32@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/3328
code/sdk/application/wearable/fd272/nativeapp/nativeui/goal/src/goalview.cpp

index ba1269b..74aa1f2 100644 (file)
@@ -19,6 +19,7 @@ namespace OHOS
 
 
     static constexpr const char *stepPaths = "/user/res/step/";
+    static constexpr const char *prossimagePath = "/user/res/step/step_b.bin";
 
     const char *stepPathsArray[] = {
      "/user/res/step/1.bin",
@@ -178,16 +179,9 @@ namespace OHOS
         goalstepLabel->SetRollSpeed(0);
         goalstepLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, 40);
         /*----------------------------------------------------------------------------- */
-        if (circleProgressimage == nullptr)
-        {
-            circleProgressimage = new UIImageView();
-        }
-        circleProgressimage->SetPosition(28, 80);
-        circleProgressimage->Resize(100, 100);
-        char *image5imagesPath = "/user/res/step/step_b.bin";
-        ImageInfo *info = ImageCacheManager::GetInstance().LoadSingleRes(image5imagesPath);
-        circleProgressimage->SetSrc(info);
-        circleProgressimage->SetVisible(true);
+
+        InitImageView(circleProgressimage, 28, 80, 100, 100, "image", prossimagePath);
+
         if (circleProgress1_ == nullptr)
         {
             circleProgress1_ = new UICircleProgress();