神龙送财开启接口。展示直播间神龙送财点击参与的图标
This commit is contained in:
@@ -53,6 +53,7 @@ import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.EffectsSettingsDialog;
|
||||
@@ -1929,6 +1930,16 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}, 3000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
Log.e("DateRemindModel", sendMoneyLongModel.toString());
|
||||
if (manager != null) {
|
||||
manager.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,8 @@ import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.dialog.DragonRulePopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class DragonSendMoneyListPopup extends AbsDialogPopupWindow {
|
||||
@@ -28,4 +30,23 @@ public class DragonSendMoneyListPopup extends AbsDialogPopupWindow {
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_dragon_send_money_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new DragonRulePopup(getContext()))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.money_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.dialog.DragonRulePopup;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -50,7 +51,8 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
}); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(getContext())
|
||||
@@ -64,19 +66,32 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
|
||||
String dragonMoney = dragon_money.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(dragonMoney)) {
|
||||
long money = Long.parseLong(dragonMoney);
|
||||
if (goldMoney>money){
|
||||
if (goldMoney > money) {
|
||||
LiveNetManager.get(getContext())
|
||||
.sendMoneyLong(mLiveUid, String.valueOf(money), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
dismiss();
|
||||
|
||||
}else {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "輸入數量不能大於自己的金豆總數量" : "The input quantity cannot be greater than the total number of gold beans");
|
||||
}
|
||||
|
||||
}else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "輸入數量不能大於自己的金豆總數量" : "The input quantity cannot be greater than the total number of gold beans");
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "輸入數量不能爲空" : "The input quantity cannot be empty");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
getCoin();
|
||||
|
||||
}
|
||||
|
||||
private void getCoin() {
|
||||
@@ -96,4 +111,8 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public interface DragonSendsMoneyCallBack {
|
||||
void onSendMoneyLong();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SocketModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@@ -802,6 +803,10 @@ public class SocketRyClient {
|
||||
GuardMaturityDateRemindModel maturityDateRemindModel = GsonUtils.fromJson(map.toString(), GuardMaturityDateRemindModel.class);
|
||||
Bus.get().post(maturityDateRemindModel);
|
||||
break;
|
||||
case "SendMoneyLong":
|
||||
SendMoneyLongModel sendMoneyLongModel = GsonUtils.fromJson(map.toString(), SendMoneyLongModel.class);
|
||||
Bus.get().post(sendMoneyLongModel);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ import com.yunbao.common.bean.RankHourModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.RewardAllModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.TaskModel;
|
||||
@@ -161,6 +162,7 @@ import com.yunbao.live.bean.LiveWishlistBean;
|
||||
import com.yunbao.live.bean.WishlistItemModel;
|
||||
import com.yunbao.live.custom.LiveLightView;
|
||||
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;
|
||||
@@ -1595,12 +1597,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
ViewClicksAntiShake.clicksAntiShake(dragonImmediateParticipation, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
// new DragonSendMoneyListPopup(mContext, mLiveUid).showDialog();
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
.show();
|
||||
new DragonSendMoneyListPopup(mContext, mLiveUid).showDialog();
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new GuardUpgradePopup(mContext, mLiveUid))
|
||||
// .show();
|
||||
}
|
||||
});
|
||||
dragonImmediateParticipation.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private LinearLayout dragonImmediateParticipation;
|
||||
@@ -3147,7 +3150,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
gift_svga.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
dragonImmediateParticipation.setVisibility(View.VISIBLE);
|
||||
}
|
||||
/**
|
||||
* 设置礼物墙和周星榜
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameDateModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@@ -2204,4 +2205,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public boolean isEnterRoom() {
|
||||
return isEnterRoom;
|
||||
}
|
||||
|
||||
public void onSendMoneyLongModel(SendMoneyLongModel sendMoneyLongModel) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.onSendMoneyLongModel(sendMoneyLongModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
@@ -8,36 +8,55 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/money_back"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/dragon_rule"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="15dp">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@mipmap/icon_live_dragon_money_back" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_rule"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_dragon_rule" />
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/dragon_sends_money"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#F9D78F"
|
||||
app:gradient_startColor="#E59F1F" />
|
||||
</FrameLayout>
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@mipmap/icon_live_dragon_money_back" />
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_dragon_rule" />
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/dragon_sends_money"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#F9D78F"
|
||||
app:gradient_startColor="#E59F1F" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
@@ -2550,6 +2550,7 @@
|
||||
android:id="@+id/dragon_immediate_participation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="180dp"
|
||||
android:gravity="center"
|
||||
@@ -2579,6 +2580,7 @@
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
|
||||
Reference in New Issue
Block a user