diff --git a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java index 8d034acfa..31786d223 100644 --- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java +++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java @@ -198,6 +198,14 @@ public class ImgLoader { .skipMemoryCache(SKIP_MEMORY_CACHE) .into(imageView); } + public static void displayNew(Context context, int res, ImageView imageView) { + if (!contextIsExist(context)) { + return; + } + Glide.with(context) + .load(res) + .into(imageView); + } /** * 显示视频封面缩略图 diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index e00907d71..1eab1b5f3 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -6193,26 +6193,26 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (i == 0) { linearGrade1.setVisibility(View.VISIBLE); textPkName1.setText(userNiceName); - ImgLoader.display(mContext, resScore, imageGrade1); + ImgLoader.displayNew(mContext, resScore, imageGrade1); textGrade1.setText(String.valueOf(userScore)); } else if (i == 1) { linearGrade2.setVisibility(View.VISIBLE); textPkName2.setText(userNiceName); - ImgLoader.display(mContext, resScore, imageGrade2); + ImgLoader.displayNew(mContext, resScore, imageGrade2); textGrade2.setText(String.valueOf(userScore)); userId2 = userId; } else if (i == 2) { if (pkScores.size() == 3) { linearGrade4.setVisibility(View.VISIBLE); textPkName4.setText(userNiceName); - ImgLoader.display(mContext, resScore, imageGrade4); + ImgLoader.displayNew(mContext, resScore, imageGrade4); textGrade4.setText(String.valueOf(userScore)); userId4 = userId; } else { linearGrade3.setVisibility(View.VISIBLE); textPkName3.setText(userNiceName); - ImgLoader.display(mContext, resScore, imageGrade3); + ImgLoader.displayNew(mContext, resScore, imageGrade3); textGrade3.setText(String.valueOf(userScore)); userId3 = userId; } @@ -6220,7 +6220,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } else if (i == 3) { linearGrade4.setVisibility(View.VISIBLE); textPkName4.setText(userNiceName); - ImgLoader.display(mContext, resScore, imageGrade4); + ImgLoader.displayNew(mContext, resScore, imageGrade4); textGrade4.setText(String.valueOf(userScore)); userId4 = userId; }