From: luozheng <1732036298@qq.com> Date: Tue, 18 Jun 2024 12:21:37 +0000 (+0800) Subject: 天气界面图片加载不用ImageCacheManager 采用直接读取路径 X-Git-Tag: release_V1.2.70_20241020_135402~986 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=30b2656a5dfe6b43907dda5516154618f0f295ea;p=mirrors%2FFD230.git 天气界面图片加载不用ImageCacheManager 采用直接读取路径 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp index 79c898e6b..cc060b91e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp @@ -580,7 +580,7 @@ namespace OHOS */ void MainPresenterSample::PullUpDown_StopTimer(void) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPresenterSample::PullUpDown_StopTimer"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainPresenterSample::PullUpDown_StopTimer"); // 检查定时器是否存在 if (g_timer != NULL) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/PullUpDownView.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/PullUpDownView.cpp index 05fd5e88a..97230ee8e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/PullUpDownView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/PullUpDownView.cpp @@ -171,7 +171,7 @@ namespace OHOS void PullUpDownView::ClearAll() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PullUpDownView::ClearAll"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PullUpDownView::ClearAll"); RemoveAll(); if (group[DROPDOWNVIEW] != nullptr) { @@ -278,7 +278,7 @@ namespace OHOS connectedStatusView = nullptr; group[CONNECTEDSTATUSVIEW] = nullptr; } - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PullUpDownView::ClearAll end!!"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PullUpDownView::ClearAll end!!"); } /// @brief 初始化icon图标背景 diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherReportView.cpp b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherReportView.cpp index b1d1557dd..808eb32e0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherReportView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherReportView.cpp @@ -257,8 +257,8 @@ namespace OHOS } for (uint8_t i = 0; i < UV_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) { - UVimageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(UVPathsArray[i]); - UVimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO; + UVimageAnimatorInfo[i].imagePath = UVPathsArray[i]; + UVimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH; UVimageAnimatorInfo[i].pos.x = UV_IMAGE_ANIMATOR_VIEW_X; UVimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y; UVimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W; @@ -283,8 +283,8 @@ namespace OHOS } for (uint8_t i = 0; i < WINDSPEED_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) { - WindSpeedimageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(WindSpeedPathsArray[i]); - WindSpeedimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO; + WindSpeedimageAnimatorInfo[i].imagePath = WindSpeedPathsArray[i]; + WindSpeedimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH; WindSpeedimageAnimatorInfo[i].pos.x = WINDSPEED_IMAGE_ANIMATOR_VIEW_X; WindSpeedimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y; WindSpeedimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W; @@ -309,8 +309,8 @@ namespace OHOS } for (uint8_t i = 0; i < HUMIDITY_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) { - HumidityimageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(HumidityPathsArray[i]); - HumidityimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO; + HumidityimageAnimatorInfo[i].imagePath = HumidityPathsArray[i]; + HumidityimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH; HumidityimageAnimatorInfo[i].pos.x = HUMIDITY_IMAGE_ANIMATOR_VIEW_X; HumidityimageAnimatorInfo[i].pos.y = UV_IMAGE_ANIMATOR_VIEW_Y; HumidityimageAnimatorInfo[i].width = UV_IMAGE_ANIMATOR_VIEW_W; @@ -379,7 +379,6 @@ namespace OHOS { for (int i = 0; i < numImages; i++) { - ImageCacheManager::GetInstance().UnloadSingleRes(imagePaths[i]); delete imagePaths[i]; imagePaths[i] = nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherView.cpp b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherView.cpp index a986f1e97..3623d49c1 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-12 11:44:04 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-18 19:35:18 + * @LastEditTime: 2024-06-18 20:04:39 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherView.cpp */ #include "weather/include/WeatherView.h" @@ -253,8 +253,8 @@ namespace OHOS } for (uint8_t i = 0; i < PULLUP_ANIMATOR_VIEW_NUM_FRAMES; i++) { - PullUpimageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(PullUpPathsArray[i]); - PullUpimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO; + PullUpimageAnimatorInfo[i].imagePath = PullUpPathsArray[i]; + PullUpimageAnimatorInfo[i].imageType = IMG_SRC_FILE_PATH; PullUpimageAnimatorInfo[i].pos.x = PULLUP_ANIMATOR_VIEW_X; PullUpimageAnimatorInfo[i].pos.y = PULLUP_ANIMATOR_VIEW_Y; PullUpimageAnimatorInfo[i].width = PULLUP_ANIMATOR_VIEW_W; @@ -316,7 +316,6 @@ namespace OHOS { for (int i = 0; i < numImages; i++) { - ImageCacheManager::GetInstance().UnloadSingleRes(imagePaths[i]); delete imagePaths[i]; imagePaths[i] = nullptr; }