From 7842c1b8389dadf77af117b65353c4a9e2b56e09 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 16 Nov 2022 13:47:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4PK=E6=8E=92=E4=BD=8D=E8=B5=9B?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E8=BF=9E=E8=83=9C=E5=A4=A7=E4=BA=8E=E7=AD=89?= =?UTF-8?q?=E4=BA=8E3=E5=9C=BA=E6=89=8D=E6=98=BE=E7=A4=BA=E8=BF=9E?= =?UTF-8?q?=E8=83=9C=E5=AD=97=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/LiveRoomViewHolder.java | 11 ++++++++--- live/src/main/res/layout/view_live_room.xml | 6 ++++-- 2 files changed, 12 insertions(+), 5 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 d06188889..f1baed586 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1540,9 +1540,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis pkRankVf.addView(titleIcon); pkRankVf.addView(hourView); pkRankVf.startFlipping(); - - mRedVal.setText(bean.getRedVal()+"連勝"); - mBlueVal.setText(bean.getBlueVal()+"連勝"); + if(Integer.parseInt(bean.getRedVal())>2) { + mRedVal.setVisibility(View.VISIBLE); + mRedVal.setText(bean.getRedVal() + "連勝"); + } + if(Integer.parseInt(bean.getBlueVal())>2) { + mBlueVal.setVisibility(View.VISIBLE); + mBlueVal.setText(bean.getBlueVal() + "連勝"); + } //ImgLoader.display(mContext,bean.getPkTopImgUrl(),mPkRankTopIcon); } }, Throwable::printStackTrace) diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 49a08a858..a00d8eec5 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -1273,7 +1273,8 @@ android:paddingBottom="8dp" android:textColor="#FFFFFF" android:textSize="15sp" - android:textStyle="bold" /> + android:textStyle="bold" + android:visibility="gone" /> + android:textStyle="bold" + android:visibility="gone" />