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,""); }