修复直播间多人PK时,用户赠送礼物后,PK时间和分数等View闪烁的问题

This commit is contained in:
老皮 2024-11-05 15:38:25 +08:00
parent b6a5fbf313
commit 9984adfb8e

View File

@ -6111,9 +6111,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void upDataPkScore(JSONArray pkScores, int time) {
L.eSw("upDataPkScore(JSONArray pkScores, int time) {" + new Gson().toJson(pkScores));
isShowGif = true;
if (detailsView != null) {
/* if (detailsView != null) {
mRoot.removeView(detailsView);
}
}*/
if (detailsView == null){
L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null");
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
timeTitle = detailsView.findViewById(R.id.time_title);
@ -6134,13 +6136,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
imageGrade2 = detailsView.findViewById(R.id.image_grade2);
imageGrade3 = detailsView.findViewById(R.id.image_grade3);
imageGrade4 = detailsView.findViewById(R.id.image_grade4);
//暂时关闭
mRoot.addView(detailsView);
}
linearGrade1.setVisibility(View.GONE);
linearGrade2.setVisibility(View.GONE);
linearGrade3.setVisibility(View.GONE);
linearGrade4.setVisibility(View.GONE);
mRoot.addView(detailsView);
mRoot.post(new Runnable() {
@Override
public void run() {
@ -6224,7 +6226,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
textPkName2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -6245,6 +6246,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
});
}
public void upDataPkScore(JSONArray pkScores) {
L.eSw("upDataPkScore(JSONArray pkScores, int time) {" + new Gson().toJson(pkScores));
isShowGif = true;
@ -6360,7 +6362,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
textPkName2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -6381,7 +6382,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
});
}
public void removeDetailView() {
if (detailsView != null) {