From b29b0a1688b1d0fe3bf7e49f65b1a28d52d6f486 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 10 Apr 2024 13:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=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 | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) 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 a5f9a9fe2..3d2cb2d03 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1686,6 +1686,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(110); dragonImmediateParticipation.setLayoutParams(layoutParams); + } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(110); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); } anchorTimeHandler.removeCallbacks(anchorTimeRunnable); LiveNetManager.get(mContext). @@ -1718,6 +1722,20 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis layoutParams.topMargin = DpUtil.dp2px(190); dragonImmediateParticipation.setLayoutParams(layoutParams); } + if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE&&mContext instanceof LiveRyAnchorActivity) { + RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + layoutParamsredPacket.topMargin = DpUtil.dp2px(110); + redPacket.setLayoutParams(layoutParamsredPacket); + + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(190); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } + if (dragonImmediateParticipationTime.getVisibility() == View.GONE&&mContext instanceof LiveRyAnchorActivity){ + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(110); + redPacket.setLayoutParams(layoutParams); + } if (redPacketModel.getCountdown() > 180) { redPacketQueue.setVisibility(View.GONE); redPacketCountdown.setVisibility(View.VISIBLE); @@ -1794,6 +1812,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis layoutParams.topMargin = DpUtil.dp2px(110); dragonImmediateParticipation.setLayoutParams(layoutParams); } + if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(110); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } } public void setRedPacketInfoModel(RedPacketInfoModel redPacket) { @@ -3196,6 +3219,15 @@ 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) { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(190); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } else { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(110); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } String s1 = StringUtil.getDurationText(sendMoneyTime * 1000); participation_time.setText(s1); participation_time.post(sendMoneyRunnable); @@ -3217,6 +3249,15 @@ 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) { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(190); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } else { + RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + layoutParams.topMargin = DpUtil.dp2px(110); + dragonImmediateParticipationTime.setLayoutParams(layoutParams); + } } else { dragonImmediateParticipation.setVisibility(View.GONE);