修复-提示报错了,注释掉了红包神龙,移动位置代码

This commit is contained in:
Martin 2024-09-06 17:15:28 +08:00
parent 6f3dd58a8b
commit 2d6f801f0b

View File

@ -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<String>() {
@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);
}
}*/
}
/**