From adac3675bbcaaf98cd3999c4c5cdf605a26629e1 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Mon, 9 Mar 2026 15:11:03 +0800 Subject: [PATCH] =?utf8?q?InitImageView=E5=87=BD=E6=95=B0=E4=BC=98?= =?utf8?q?=E5=8C=96=E5=9B=BE=E7=89=87=E4=B8=8D=E5=86=8D=E4=BD=BF=E7=94=A8L?= =?utf8?q?oadSingleRes?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../uicomponents/UIComponents.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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*/ -- 2.17.1