修复直播间多人PK时,用户赠送礼物后,顺序图片(1、2、3、4)闪烁问题
This commit is contained in:
parent
9984adfb8e
commit
16cb90d9bc
@ -198,6 +198,14 @@ public class ImgLoader {
|
|||||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||||
.into(imageView);
|
.into(imageView);
|
||||||
}
|
}
|
||||||
|
public static void displayNew(Context context, int res, ImageView imageView) {
|
||||||
|
if (!contextIsExist(context)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Glide.with(context)
|
||||||
|
.load(res)
|
||||||
|
.into(imageView);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示视频封面缩略图
|
* 显示视频封面缩略图
|
||||||
|
@ -6193,26 +6193,26 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
linearGrade1.setVisibility(View.VISIBLE);
|
linearGrade1.setVisibility(View.VISIBLE);
|
||||||
textPkName1.setText(userNiceName);
|
textPkName1.setText(userNiceName);
|
||||||
ImgLoader.display(mContext, resScore, imageGrade1);
|
ImgLoader.displayNew(mContext, resScore, imageGrade1);
|
||||||
textGrade1.setText(String.valueOf(userScore));
|
textGrade1.setText(String.valueOf(userScore));
|
||||||
|
|
||||||
} else if (i == 1) {
|
} else if (i == 1) {
|
||||||
linearGrade2.setVisibility(View.VISIBLE);
|
linearGrade2.setVisibility(View.VISIBLE);
|
||||||
textPkName2.setText(userNiceName);
|
textPkName2.setText(userNiceName);
|
||||||
ImgLoader.display(mContext, resScore, imageGrade2);
|
ImgLoader.displayNew(mContext, resScore, imageGrade2);
|
||||||
textGrade2.setText(String.valueOf(userScore));
|
textGrade2.setText(String.valueOf(userScore));
|
||||||
userId2 = userId;
|
userId2 = userId;
|
||||||
} else if (i == 2) {
|
} else if (i == 2) {
|
||||||
if (pkScores.size() == 3) {
|
if (pkScores.size() == 3) {
|
||||||
linearGrade4.setVisibility(View.VISIBLE);
|
linearGrade4.setVisibility(View.VISIBLE);
|
||||||
textPkName4.setText(userNiceName);
|
textPkName4.setText(userNiceName);
|
||||||
ImgLoader.display(mContext, resScore, imageGrade4);
|
ImgLoader.displayNew(mContext, resScore, imageGrade4);
|
||||||
textGrade4.setText(String.valueOf(userScore));
|
textGrade4.setText(String.valueOf(userScore));
|
||||||
userId4 = userId;
|
userId4 = userId;
|
||||||
} else {
|
} else {
|
||||||
linearGrade3.setVisibility(View.VISIBLE);
|
linearGrade3.setVisibility(View.VISIBLE);
|
||||||
textPkName3.setText(userNiceName);
|
textPkName3.setText(userNiceName);
|
||||||
ImgLoader.display(mContext, resScore, imageGrade3);
|
ImgLoader.displayNew(mContext, resScore, imageGrade3);
|
||||||
textGrade3.setText(String.valueOf(userScore));
|
textGrade3.setText(String.valueOf(userScore));
|
||||||
userId3 = userId;
|
userId3 = userId;
|
||||||
}
|
}
|
||||||
@ -6220,7 +6220,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
} else if (i == 3) {
|
} else if (i == 3) {
|
||||||
linearGrade4.setVisibility(View.VISIBLE);
|
linearGrade4.setVisibility(View.VISIBLE);
|
||||||
textPkName4.setText(userNiceName);
|
textPkName4.setText(userNiceName);
|
||||||
ImgLoader.display(mContext, resScore, imageGrade4);
|
ImgLoader.displayNew(mContext, resScore, imageGrade4);
|
||||||
textGrade4.setText(String.valueOf(userScore));
|
textGrade4.setText(String.valueOf(userScore));
|
||||||
userId4 = userId;
|
userId4 = userId;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user