修改直播间内红包和神龙送财的位置首页的位置
This commit is contained in:
parent
d0f2ac2c60
commit
61a966ea41
@ -34,12 +34,14 @@ import com.yunbao.common.manager.IMLoginManager;
|
|||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.TimeUtils;
|
import com.yunbao.common.utils.TimeUtils;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
|
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||||
import com.yunbao.live.adapter.NewGuardAdapter;
|
import com.yunbao.live.adapter.NewGuardAdapter;
|
||||||
import com.yunbao.live.bean.GuardUserModel;
|
import com.yunbao.live.bean.GuardUserModel;
|
||||||
|
|
||||||
@ -290,6 +292,7 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(myGraudGrade, new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(myGraudGrade, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
dismiss();
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
htmlUrl.append(CommonAppConfig.HOST)
|
htmlUrl.append(CommonAppConfig.HOST)
|
||||||
@ -302,13 +305,8 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
|||||||
.append(mLiveUid)
|
.append(mLiveUid)
|
||||||
.append("&isZh=")
|
.append("&isZh=")
|
||||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
||||||
|
RouteUtil.forwardZhuangBanActivity(htmlUrl.toString());
|
||||||
|
|
||||||
Bundle bundle = new Bundle();
|
|
||||||
bundle.putString("url", htmlUrl.toString());
|
|
||||||
bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3);
|
|
||||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
|
||||||
fragment.setArguments(bundle);
|
|
||||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1675,6 +1675,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
redPacket.setVisibility(View.GONE);
|
redPacket.setVisibility(View.GONE);
|
||||||
|
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}
|
||||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||||
LiveNetManager.get(mContext).
|
LiveNetManager.get(mContext).
|
||||||
endRedPacket(mLiveUid, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
endRedPacket(mLiveUid, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||||
@ -1701,6 +1706,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mRedPacketModel = redPacketModel;
|
mRedPacketModel = redPacketModel;
|
||||||
if (redPacketModel.getIsShow() == 1) {
|
if (redPacketModel.getIsShow() == 1) {
|
||||||
redPacket.setVisibility(View.VISIBLE);
|
redPacket.setVisibility(View.VISIBLE);
|
||||||
|
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}
|
||||||
if (redPacketModel.getCountdown() > 180) {
|
if (redPacketModel.getCountdown() > 180) {
|
||||||
redPacketQueue.setVisibility(View.GONE);
|
redPacketQueue.setVisibility(View.GONE);
|
||||||
redPacketCountdown.setVisibility(View.VISIBLE);
|
redPacketCountdown.setVisibility(View.VISIBLE);
|
||||||
@ -1772,6 +1782,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
public void hindeRedPacket() {
|
public void hindeRedPacket() {
|
||||||
redPacket.setVisibility(View.GONE);
|
redPacket.setVisibility(View.GONE);
|
||||||
|
if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) {
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
|
public void setRedPacketInfoModel(RedPacketInfoModel redPacket) {
|
||||||
@ -3179,6 +3194,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
participation_time.post(sendMoneyRunnable);
|
participation_time.post(sendMoneyRunnable);
|
||||||
} else {
|
} else {
|
||||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||||
|
if (redPacket.getVisibility()==View.VISIBLE){
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(190);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}else {
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3188,6 +3212,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
dragonImmediateParticipationTime.setVisibility(View.GONE);
|
dragonImmediateParticipationTime.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
dragonImmediateParticipation.setVisibility(View.GONE);
|
dragonImmediateParticipation.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3221,6 +3246,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
public void onSendMoneyLong() {
|
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(190);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}else {
|
||||||
|
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams();
|
||||||
|
layoutParams.topMargin = DpUtil.dp2px(110);
|
||||||
|
dragonImmediateParticipation.setLayoutParams(layoutParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,10 +155,10 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
|||||||
}
|
}
|
||||||
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams();
|
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams();
|
||||||
if (bean.getRedPacketStatus() == 1) {
|
if (bean.getRedPacketStatus() == 1) {
|
||||||
dragon_moneyLayoutParams.leftMargin = DpUtil.dp2px(35);
|
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55);
|
||||||
redPacket.setVisibility(View.VISIBLE);
|
redPacket.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
dragon_moneyLayoutParams.leftMargin = DpUtil.dp2px(20);
|
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(25);
|
||||||
redPacket.setVisibility(View.GONE);
|
redPacket.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -292,8 +292,8 @@
|
|||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginStart="35dp"
|
android:layout_marginStart="25dp"
|
||||||
android:layout_marginTop="25dp"
|
android:layout_marginTop="55dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:srcCompat="@mipmap/icon_live_dragon_money"
|
app:srcCompat="@mipmap/icon_live_dragon_money"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
Loading…
Reference in New Issue
Block a user