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

This commit is contained in:
老皮 2024-11-05 17:10:02 +08:00
parent 16cb90d9bc
commit af23094df7

View File

@ -6115,6 +6115,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mRoot.removeView(detailsView); mRoot.removeView(detailsView);
}*/ }*/
// TODO 这里可能存在问题需要问何
if (detailsView == null){ if (detailsView == null){
L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null"); L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null");
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null); detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
@ -6136,8 +6137,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
imageGrade2 = detailsView.findViewById(R.id.image_grade2); imageGrade2 = detailsView.findViewById(R.id.image_grade2);
imageGrade3 = detailsView.findViewById(R.id.image_grade3); imageGrade3 = detailsView.findViewById(R.id.image_grade3);
imageGrade4 = detailsView.findViewById(R.id.image_grade4); imageGrade4 = detailsView.findViewById(R.id.image_grade4);
}
if (detailsView.getParent() == null){
L.eSw("detailsView 添加到了 mRoot");
mRoot.addView(detailsView); mRoot.addView(detailsView);
} }
linearGrade1.setVisibility(View.GONE); linearGrade1.setVisibility(View.GONE);
linearGrade2.setVisibility(View.GONE); linearGrade2.setVisibility(View.GONE);
linearGrade3.setVisibility(View.GONE); linearGrade3.setVisibility(View.GONE);