From 2d6f801f0bed95718af4d9f40e655455dc7b8514 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Fri, 6 Sep 2024 17:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E6=8F=90=E7=A4=BA=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BA=86=EF=BC=8C=E6=B3=A8=E9=87=8A=E6=8E=89=E4=BA=86?= =?UTF-8?q?=E7=BA=A2=E5=8C=85=E7=A5=9E=E9=BE=99=EF=BC=8C=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 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 adb719a8b..a5a44b964 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2635,16 +2635,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } else { redPacket.setVisibility(View.GONE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + /*if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ anchorTimeHandler.removeCallbacks(anchorTimeRunnable); LiveNetManager.get(mContext).endRedPacket(mLiveUid, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback() { @Override @@ -2670,27 +2670,27 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mRedPacketModel = redPacketModel; if (redPacketModel.getIsShow() == 1) { redPacket.setVisibility(View.VISIBLE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + /*if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity || mContext instanceof LiveSwAnchorActivity) { - RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + LinearLayout.LayoutParams layoutParamsredPacket = (LinearLayout.LayoutParams) redPacket.getLayoutParams(); layoutParamsredPacket.topMargin = DpUtil.dp2px(160); redPacket.setLayoutParams(layoutParamsredPacket); - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipationTime.setLayoutParams(layoutParams); } if (mContext instanceof LiveRyAnchorActivity || mContext instanceof LiveSwAnchorActivity) { if (dragonImmediateParticipationTime.getVisibility() == View.GONE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) redPacket.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); redPacket.setLayoutParams(layoutParams); } - } + }*/ if (redPacketModel.getCountdown() > 180) { redPacketQueue.setVisibility(View.GONE); redPacketCountdown.setVisibility(View.VISIBLE); @@ -2751,16 +2751,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void hindeRedPacket() { redPacket.setVisibility(View.GONE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + /* if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ } public void setRedPacketInfoModel(RedPacketInfoModel redPacket) { @@ -4073,7 +4073,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis sendMoneyTime = Long.parseLong(sendMoneyLongModel.getCountdown()); participation_time.removeCallbacks(sendMoneyRunnable); dragonImmediateParticipationTime.setVisibility(View.VISIBLE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipationTime.setLayoutParams(layoutParams); @@ -4081,13 +4081,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ String s1 = StringUtil.getDurationText(sendMoneyTime * 1000); participation_time.setText(s1); participation_time.post(sendMoneyRunnable); } else { dragonImmediateParticipation.setVisibility(View.VISIBLE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipation.setLayoutParams(layoutParams); @@ -4095,7 +4095,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); - } + }*/ } } @@ -4103,7 +4103,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent moneyLongEndEvent) { if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) { dragonImmediateParticipationTime.setVisibility(View.GONE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(190); dragonImmediateParticipationTime.setLayoutParams(layoutParams); @@ -4111,7 +4111,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ } else { dragonImmediateParticipation.setVisibility(View.GONE); @@ -4145,7 +4145,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }; public void onSendMoneyLong() { - dragonImmediateParticipation.setVisibility(View.VISIBLE); + /*dragonImmediateParticipation.setVisibility(View.VISIBLE); if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); @@ -4154,7 +4154,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(110); dragonImmediateParticipation.setLayoutParams(layoutParams); - } + }*/ } /**