From 9984adfb8ecdde5cd49dcd145386fed6e6d526e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=9A=AE?= <14840170+lao-pi123@user.noreply.gitee.com> Date: Tue, 5 Nov 2024 15:38:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E9=97=B4?= =?UTF-8?q?=E5=A4=9A=E4=BA=BAPK=E6=97=B6=EF=BC=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=B5=A0=E9=80=81=E7=A4=BC=E7=89=A9=E5=90=8E=EF=BC=8CPK?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=92=8C=E5=88=86=E6=95=B0=E7=AD=89View?= =?UTF-8?q?=E9=97=AA=E7=83=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) 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 bad22304b..e00907d71 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -6111,36 +6111,38 @@ 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); + textTime = detailsView.findViewById(R.id.text_time); + linearGrade1 = detailsView.findViewById(R.id.lin_pk1); + linearGrade2 = detailsView.findViewById(R.id.lin_pk2); + linearGrade3 = detailsView.findViewById(R.id.lin_pk3); + linearGrade4 = detailsView.findViewById(R.id.lin_pk4); + textPkName1 = detailsView.findViewById(R.id.text_pk_name1); + textPkName2 = detailsView.findViewById(R.id.text_pk_name2); + textPkName3 = detailsView.findViewById(R.id.text_pk_name3); + textPkName4 = detailsView.findViewById(R.id.text_pk_name4); + textGrade1 = detailsView.findViewById(R.id.text_grade1); + textGrade2 = detailsView.findViewById(R.id.text_grade2); + textGrade3 = detailsView.findViewById(R.id.text_grade3); + textGrade4 = detailsView.findViewById(R.id.text_grade4); + imageGrade1 = detailsView.findViewById(R.id.image_grade1); + imageGrade2 = detailsView.findViewById(R.id.image_grade2); + imageGrade3 = detailsView.findViewById(R.id.image_grade3); + imageGrade4 = detailsView.findViewById(R.id.image_grade4); + mRoot.addView(detailsView); } - 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); - textTime = detailsView.findViewById(R.id.text_time); - linearGrade1 = detailsView.findViewById(R.id.lin_pk1); - linearGrade2 = detailsView.findViewById(R.id.lin_pk2); - linearGrade3 = detailsView.findViewById(R.id.lin_pk3); - linearGrade4 = detailsView.findViewById(R.id.lin_pk4); - textPkName1 = detailsView.findViewById(R.id.text_pk_name1); - textPkName2 = detailsView.findViewById(R.id.text_pk_name2); - textPkName3 = detailsView.findViewById(R.id.text_pk_name3); - textPkName4 = detailsView.findViewById(R.id.text_pk_name4); - textGrade1 = detailsView.findViewById(R.id.text_grade1); - textGrade2 = detailsView.findViewById(R.id.text_grade2); - textGrade3 = detailsView.findViewById(R.id.text_grade3); - textGrade4 = detailsView.findViewById(R.id.text_grade4); - imageGrade1 = detailsView.findViewById(R.id.image_grade1); - imageGrade2 = detailsView.findViewById(R.id.image_grade2); - imageGrade3 = detailsView.findViewById(R.id.image_grade3); - imageGrade4 = detailsView.findViewById(R.id.image_grade4); - //暂时关闭 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) {