神龙列表接口对接,神龙送财活动参加接口对接,ui更新
This commit is contained in:
@@ -48,6 +48,7 @@ import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MicUserBean;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.NotCancelableDialog;
|
||||
import com.yunbao.common.event.GiftWallIlluminateEvent;
|
||||
@@ -1709,6 +1710,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
liveInputDialogFragment.setArguments(liveInputBundle);
|
||||
liveInputDialogFragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,13 @@ public class DragonSendMoneyListPopup extends AbsDialogPopupWindow {
|
||||
String mLiveUid;
|
||||
DragonSendMoneyListAdapter dragonSendMoneyListAdapter;
|
||||
RecyclerView send_money_list;
|
||||
boolean isAnchor;
|
||||
|
||||
public DragonSendMoneyListPopup(@NonNull Context context, String liveUid) {
|
||||
public DragonSendMoneyListPopup(@NonNull Context context, String liveUid, boolean isAnchor) {
|
||||
super(context);
|
||||
activity = (FragmentActivity) context;
|
||||
mLiveUid = liveUid;
|
||||
this.isAnchor = isAnchor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,7 +54,7 @@ public class DragonSendMoneyListPopup extends AbsDialogPopupWindow {
|
||||
dragonSendMoneyListAdapter = new DragonSendMoneyListAdapter(send_money_list);
|
||||
|
||||
send_money_list.setAdapter(dragonSendMoneyListAdapter);
|
||||
|
||||
dragonSendMoneyListAdapter.setAnchor(isAnchor);
|
||||
dragonSendMoneyListAdapter.setCallBack(new DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack() {
|
||||
@Override
|
||||
public void onParticipate(sendMoneyLongListModel moneyLongListModel) {
|
||||
|
||||
@@ -165,7 +165,6 @@ import com.yunbao.live.custom.RightGradual;
|
||||
import com.yunbao.live.dialog.DragonSendMoneyListPopup;
|
||||
import com.yunbao.live.dialog.DragonSendsMoneyPopup;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.dialog.GuardUpgradePopup;
|
||||
import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
@@ -636,9 +635,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
// if (TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), liveReceiveGiftBean.getUid())
|
||||
// && TextUtils.equals(liveReceiveGiftBean.getGuard_type(), "3")) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -1594,10 +1593,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
combo_layout.setVisibility(View.GONE);
|
||||
|
||||
dragonImmediateParticipation = (LinearLayout) findViewById(R.id.dragon_immediate_participation);
|
||||
dragonImmediateParticipationTime = (LinearLayout) findViewById(R.id.dragon_immediate_participation_time);
|
||||
participation_time = (TextView) findViewById(R.id.participation_time);
|
||||
ViewClicksAntiShake.clicksAntiShake(dragonImmediateParticipation, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid).showDialog();
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid, false).showDialog();
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(dragonImmediateParticipationTime, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid, true).showDialog();
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
// .show();
|
||||
@@ -1606,9 +1616,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
// dragonImmediateParticipation.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private LinearLayout dragonImmediateParticipation;
|
||||
private LinearLayout dragonImmediateParticipation, dragonImmediateParticipationTime;
|
||||
private FrameLayout redPacket;
|
||||
private TextView redPacketCountdown, redSchedule, openRedPacket;
|
||||
private TextView redPacketCountdown, redSchedule, openRedPacket, participation_time;
|
||||
private LinearLayout redPacketQueue;
|
||||
private int redTimeCountdown = 0;
|
||||
private RedPacketModel mRedPacketModel;
|
||||
@@ -3150,12 +3160,41 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
gift_svga.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) {
|
||||
sendMoneyTime = Long.parseLong(sendMoneyLongModel.getCountdown());
|
||||
participation_time.removeCallbacks(sendMoneyRunnable);
|
||||
dragonImmediateParticipationTime.setVisibility(View.VISIBLE);
|
||||
String s1 = StringUtil.getDurationText(sendMoneyTime * 1000);
|
||||
participation_time.setText(s1);
|
||||
participation_time.post(sendMoneyRunnable);
|
||||
} else {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private long sendMoneyTime;
|
||||
Runnable sendMoneyRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
sendMoneyTime--;
|
||||
if (sendMoneyTime > 0) {
|
||||
String s1 = StringUtil.getDurationText(sendMoneyTime * 1000);
|
||||
participation_time.setText(s1);
|
||||
participation_time.postDelayed(sendMoneyRunnable, 1000);
|
||||
} else {
|
||||
participation_time.removeCallbacks(sendMoneyRunnable);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void onSendMoneyLong() {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置礼物墙和周星榜
|
||||
*/
|
||||
|
||||
@@ -2589,6 +2589,7 @@
|
||||
android:src="@mipmap/icon_live_dragon_money" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/participation_time"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
|
||||
Reference in New Issue
Block a user