From: luozheng <1732036298@qq.com> Date: Mon, 9 Mar 2026 07:11:03 +0000 (+0800) Subject: InitImageView函数优化图片不再使用LoadSingleRes X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F3255%2F1;p=mirrors%2FFD230.git InitImageView函数优化图片不再使用LoadSingleRes --- diff --git a/code/sdk/zhihui/UI/CustomUIComponentTool/uicomponents/UIComponents.cpp b/code/sdk/zhihui/UI/CustomUIComponentTool/uicomponents/UIComponents.cpp index 0d66ea619..1bec6ec7b 100644 --- a/code/sdk/zhihui/UI/CustomUIComponentTool/uicomponents/UIComponents.cpp +++ b/code/sdk/zhihui/UI/CustomUIComponentTool/uicomponents/UIComponents.cpp @@ -445,15 +445,16 @@ bool InitImageView(UIImageView *&imageView, int left, int top, int width, imageView->SetPosition(left, top); imageView->SetAutoEnable(true); imageView->SetViewId(viewId); + imageView->SetSrc(imagePath); - ImageInfo *image = - ImageCacheManager::GetInstance().LoadSingleRes(imagePath, false); - if (image == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, - "LoadAllDialFromRam loadimage %s fail", imagePath); - return false; - } - imageView->SetSrc(image); + // ImageInfo *image = + // ImageCacheManager::GetInstance().LoadSingleRes(imagePath, false); + // if (image == nullptr) { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, + // "LoadAllDialFromRam loadimage %s fail", imagePath); + // return false; + // } + // imageView->SetSrc(image); return true; } /*带默认参数的初始化label*/