From 7129fa5546a5bbecd95dcd3732bb52fb481d7ccb Mon Sep 17 00:00:00 2001 From: liup <1454939542@qq.com> Date: Thu, 12 Sep 2024 10:07:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonait/bnframework/common/image/MyBitmapUtils.java | 2 +- .../bnframework/common/image/utils/LocalCacheUtils.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java b/app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java index 997908c9..b97408d3 100644 --- a/app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java +++ b/app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java @@ -42,7 +42,7 @@ public class MyBitmapUtils { } //网络缓存 - if(url.contains("http")) + if(url.contains("http")&&(url.contains("png")||url.contains("jpg")||url.contains("jpeg"))) { LogUtils.d("disPlay getBitmapFromNet url="+url); mNetCacheUtils.getBitmapFromNet(ivPic,url); diff --git a/app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java b/app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java index c325d279..a137276e 100644 --- a/app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java +++ b/app/src/main/java/com/bonait/bnframework/common/image/utils/LocalCacheUtils.java @@ -42,6 +42,10 @@ public class LocalCacheUtils { * @return */ public boolean SetBitmapFile(ImageView ivPic, String name, String url) { + if((!name.contains("png")&&!name.contains("jpg")&&!name.contains("jpeg"))){ + ivPic.setImageResource(R.mipmap.loading123); + return true; + } if(name.contains(CACHE_PATH)){ name = name.replace(CACHE_PATH,""); }