直播间多人PK时,用户赠送礼物后,PK时间和分数等View闪烁的问题 回到老版本(有问题,先闪烁)

This commit is contained in:
老皮 2024-11-06 13:36:23 +08:00
parent af23094df7
commit 8a6f1ae9e8

View File

@ -6111,12 +6111,9 @@ 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);
}*/
// TODO 这里可能存在问题需要问何
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);
@ -6137,17 +6134,12 @@ 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);
}
if (detailsView.getParent() == null){
L.eSw("detailsView 添加到了 mRoot");
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