diff --git a/app/build.gradle b/app/build.gradle
index 6a5cb886f..4a5890d4b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -166,23 +166,23 @@ android {
}
}
variant.outputs.all {
- def isGoogle = "link"
+ def isGoogle = "链接"
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 1) {
- isGoogle = "Google"
+ isGoogle = "谷歌"
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
isGoogle = "Huawei"
}else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
isGoogle = "Samsung"
}
- def isPlugin = "all"
+ def isPlugin = "完整"
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
- isPlugin = "plugin"
+ isPlugin = "插件"
}
def isTest = "测试服"
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
isTest = "正式服"
}
- outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
+ outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
}
}
diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java
index 9e926bd0a..6d42c5495 100644
--- a/app/src/main/java/com/shayu/phonelive/AppContext.java
+++ b/app/src/main/java/com/shayu/phonelive/AppContext.java
@@ -23,6 +23,7 @@ import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.Utils;
import com.facebook.appevents.AppEventsLogger;
import com.fm.openinstall.OpenInstall;
+import com.google.gson.Gson;
import com.shayu.phonelive.utils.LogUtils;
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
import com.tencent.imsdk.v2.V2TIMManager;
@@ -36,12 +37,14 @@ import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.AnchorStartLiveBean;
import com.yunbao.common.bean.CrashSaveBean;
+import com.yunbao.common.event.SudGameSocketImEvent;
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.utils.AppManager;
+import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.GoogleUtils;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.SpUtil;
@@ -210,6 +213,11 @@ public class AppContext extends CommonAppContext {
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
JSONObject map = received.getMsg().getJSONObject(0);
sendStartAnchorLive(map);
+ } else if (message.getTargetId().contains("v")) {
+ String contentJson = ((TextMessage) message.getContent()).getContent();
+ Log.e("wewe", contentJson);
+ SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
+ Bus.get().post(sudGameSocketImEvent);
}
//主播页面
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
diff --git a/common/build.gradle b/common/build.gradle
index 6a33267a5..b9ff40117 100644
--- a/common/build.gradle
+++ b/common/build.gradle
@@ -191,7 +191,7 @@ dependencies {
api 'com.github.princekin-f:EasyFloat:2.0.4'
api files('libs/Msc.jar')
- api 'com.github.li-xiaojun:XPopup:2.9.1'
+ api 'com.github.li-xiaojun:XPopup:2.10.0'
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
//选择器
@@ -209,6 +209,8 @@ dependencies {
// 多语言语音识别扩展库(可选)
api 'tech.sud.mgp:SudASR:1.3.3.1158'
+ //侧滑删除
+ api 'com.yanzhenjie.recyclerview:x:1.3.2'
//华为支付插件包
//api project(':lib_huawei')
diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml
index d9bf690aa..5b9ff7982 100644
--- a/common/src/main/AndroidManifest.xml
+++ b/common/src/main/AndroidManifest.xml
@@ -56,9 +56,7 @@
-
+
mUserItemList;//个人中心功能列表
- private SparseArray mLevelMap;
- private SparseArray mAnchorLevelMap;
private SparseArray mAnchorFansMedalMap;
private String mGiftListJson;
private String mWrapListJson;
@@ -521,46 +517,6 @@ public class CommonAppConfig {
}
- /**
- * 保存用户等级信息
- */
- public void setLevel(String levelJson) {
- if (TextUtils.isEmpty(levelJson)) {
- return;
- }
- List list = JSON.parseArray(levelJson, LevelBean.class);
- if (list == null || list.size() == 0) {
- return;
- }
- if (mLevelMap == null) {
- mLevelMap = new SparseArray<>();
- }
- mLevelMap.clear();
- for (LevelBean bean : list) {
- mLevelMap.put(bean.getLevel(), bean);
- }
- }
-
- /**
- * 保存主播等级信息
- */
- public void setAnchorLevel(String anchorLevelJson) {
- if (TextUtils.isEmpty(anchorLevelJson)) {
- return;
- }
- List list = JSON.parseArray(anchorLevelJson, LevelBean.class);
- if (list == null || list.size() == 0) {
- return;
- }
- if (mAnchorLevelMap == null) {
- mAnchorLevelMap = new SparseArray<>();
- }
- mAnchorLevelMap.clear();
- for (LevelBean bean : list) {
- mAnchorLevelMap.put(bean.getLevel(), bean);
- }
- }
-
/**
* 保存主播粉丝徽章信息
*/
@@ -599,40 +555,6 @@ public class CommonAppConfig {
}
- /**
- * 获取用户等级
- */
- public LevelBean getLevel(int level) {
- if (mLevelMap == null) {
- String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
- if (!TextUtils.isEmpty(configString)) {
- JSONObject obj = JSON.parseObject(configString);
- setLevel(obj.getString("level"));
- }
- }
- if (mLevelMap == null || mLevelMap.size() == 0) {
- return null;
- }
- return mLevelMap.get(level);
- }
-
- /**
- * 获取主播等级
- */
- public LevelBean getAnchorLevel(int level) {
- if (mAnchorLevelMap == null) {
- String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
- if (!TextUtils.isEmpty(configString)) {
- JSONObject obj = JSON.parseObject(configString);
- setAnchorLevel(obj.getString("levelanchor"));
- }
- }
- if (mAnchorLevelMap == null || mAnchorLevelMap.size() == 0) {
- return null;
- }
- return mAnchorLevelMap.get(level);
- }
-
public String getGiftListJson() {
return mGiftListJson;
}
diff --git a/common/src/main/java/com/yunbao/common/Constants.java b/common/src/main/java/com/yunbao/common/Constants.java
index 6f9ed2090..a0ea5df91 100644
--- a/common/src/main/java/com/yunbao/common/Constants.java
+++ b/common/src/main/java/com/yunbao/common/Constants.java
@@ -263,6 +263,8 @@ public class Constants {
public static final String LIVE_SDK = "liveSdk";
public static final String LIVE_KSY_CONFIG = "liveKsyConfig";
+
+ public static final String LIVE_PK_RANDOM_START="RankingStartRandomPK";
public static final int LIVE_SDK_KSY = 0;//金山推流
public static final int LIVE_SDK_TX = 1;//腾讯推流
diff --git a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java
deleted file mode 100644
index 93544495f..000000000
--- a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java
+++ /dev/null
@@ -1,214 +0,0 @@
-package com.yunbao.common.activity;
-
-import android.app.Activity;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.TextView;
-
-import androidx.lifecycle.Observer;
-
-import com.google.gson.Gson;
-import com.lxj.xpopup.XPopup;
-import com.makeramen.roundedimageview.RoundedImageView;
-import com.yunbao.common.R;
-import com.yunbao.common.bean.CheckRemainingBalance;
-import com.yunbao.common.bean.CreateSudRoomModel;
-import com.yunbao.common.bean.CustomSidebarChildModel;
-import com.yunbao.common.bean.CustomSidebarInfoModel;
-import com.yunbao.common.event.CheckRemainingBalanceEvent;
-import com.yunbao.common.glide.ImgLoader;
-import com.yunbao.common.http.base.HttpCallback;
-import com.yunbao.common.http.live.LiveNetManager;
-import com.yunbao.common.manager.IMLoginManager;
-import com.yunbao.common.sud.QuickStartGameViewModel;
-import com.yunbao.common.sud.model.GameConfigModel;
-import com.yunbao.common.sud.state.SudMGPMGState;
-import com.yunbao.common.utils.Bus;
-import com.yunbao.common.utils.ToastUtil;
-import com.yunbao.common.views.LiveSudGameHistoryPopup;
-import com.yunbao.common.views.weight.ViewClicksAntiShake;
-
-import org.greenrobot.eventbus.Subscribe;
-import org.greenrobot.eventbus.ThreadMode;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-public class SudGameActivity extends AbsActivity {
- private FrameLayout gameContainer;
- private long mInteractionID;
- private String mLiveUid;
- private final QuickStartGameViewModel gameViewModel = new QuickStartGameViewModel(); // 创建ViewModel
-
- private CreateSudRoomModel mCreateSudRoomModel;
- private TextView gameTitle, roomName, roomNumber;
- private RoundedImageView mAvatar;
- @Override
- protected int getLayoutId() {
- return R.layout.activity_sud_game;
- }
-
- @Override
- protected void main() {
- Bus.getOn(this);
- super.main();
- initView();
- initDate();
- }
- private List customSidebarChildModels = new ArrayList<>();
- private void initDate() {
- LiveNetManager.get(mContext)
- .getCustomSidebarInfo("1", new HttpCallback>() {
- @Override
- public void onSuccess(List data) {
- for (CustomSidebarInfoModel datum : data) {
- if (datum.getType().equals("6")) {
- customSidebarChildModels = datum.getChild();
- return;
- }
- }
- }
-
- @Override
- public void onError(String error) {
-
- }
- });
- }
- @Override
- protected void onDestroy() {
- Bus.getOff(this);
- super.onDestroy();
- }
-
- private void initView() {
- String createSudRoomJson = getIntent().getStringExtra("CreateSudRoom");
- mCreateSudRoomModel = new Gson().fromJson(createSudRoomJson, CreateSudRoomModel.class);
- mInteractionID = mCreateSudRoomModel.getLongSudGameId();
- mLiveUid = mCreateSudRoomModel.getSudGameRoomId();
-
- gameContainer = findViewById(R.id.game_container);
- gameTitle = findViewById(R.id.game_title);
- roomName = findViewById(R.id.room_name);
- roomNumber = findViewById(R.id.room_number);
- mAvatar = findViewById(R.id.avatar);
- if (mCreateSudRoomModel != null) {
- gameTitle.setText(mCreateSudRoomModel.getSudGameName());
- roomName.setText(mCreateSudRoomModel.getRoomName());
- roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId());
- ImgLoader.display(mContext, mCreateSudRoomModel.getAvatar(), mAvatar);
- }
- ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
- @Override
- public void onViewClicks() {
- gameViewModel.onDestroy();
- finish();
- }
- });
- ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
- @Override
- public void onViewClicks() {
-
- new XPopup.Builder(mContext)
- .enableDrag(false)
- .asCustom(new LiveSudGameHistoryPopup(mContext, customSidebarChildModels)).show();
- }
- });
- gameViewModel.gameViewLiveData.observe(this, new Observer() {
- @Override
- public void onChanged(View view) {
- if (view == null) { // 在关闭游戏时,把游戏View给移除
- gameContainer.removeAllViews();
- } else { // 把游戏View添加到容器内
- gameContainer.addView(view, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
- }
- }
- });
- // 加载游戏,参数定义可查看BaseGameViewModel.switchGame()方法注释
- // 游戏配置
- GameConfigModel gameConfigModel = gameViewModel.getGameConfigModel();
- gameConfigModel.ui.ping.hide = true; // 配置不隐藏ping值
- gameConfigModel.ui.level.hide = true; // 配置不隐藏ping值
- gameConfigModel.ui.lobby_game_setting.hide = true; // 配置不隐藏ping值
-
- gameConfigModel.ui.lobby_players.custom = true;
- gameConfigModel.ui.join_btn.custom = true;
- gameConfigModel.ui.game_settle_again_btn.custom = true;
- gameConfigModel.ui.start_btn.custom = true;
-
- // SudMGP平台64bit游戏ID
- gameViewModel.switchGame((Activity) mContext, mLiveUid, mInteractionID);
-// gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, -1, true, 1);
-// gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfCaptain(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
-// ViewClicksAntiShake.clicksAntiShake(gameTitle, new ViewClicksAntiShake.ViewClicksCallBack() {
-// @Override
-// public void onViewClicks() {
-//
-// }
-// });
-
-
- }
-
- @Subscribe(threadMode = ThreadMode.MAIN)
- public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
- switch (event.getSudMGPMGState()) {
- case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
- case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
- LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback() {
- @Override
- public void onSuccess(CheckRemainingBalance data) {
- if (data.getGoldenBeanRemainingBalance() == 1) {
- gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
- } else {
- if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
- ToastUtil.show("貨幣数量不足 ");
- } else {
- ToastUtil.show("Shortage of money");
- }
-
- }
- }
-
- @Override
- public void onError(String error) {
- if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
- ToastUtil.show("貨幣数量不足 ");
- } else {
- ToastUtil.show("Shortage of money");
- }
- }
- });
- break;
- case SudMGPMGState.MG_COMMON_GAME_SETTLE:
- gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1);
- break;
- case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN:
- LiveNetManager.get(mContext).gameStartCheckRemainingBalance(mCreateSudRoomModel.getSudGameId(),
- mCreateSudRoomModel.getSudGameRoomId(), new
- HttpCallback() {
- @Override
- public void onSuccess(CheckRemainingBalance data) {
- if (data.getStatus()==1){
- gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true);
- }else {
-
- }
-
- }
-
- @Override
- public void onError(String error) {
- ToastUtil.show(error);
- }
- });
- break;
- case SudMGPMGState.MG_COMMON_GAME_STATE:
- LiveNetManager.get(mContext).deductMoney( mCreateSudRoomModel.getSudGameRoomId());
- break;
- }
-
- }
-
-}
diff --git a/common/src/main/java/com/yunbao/common/adapter/RefreshAdapter.java b/common/src/main/java/com/yunbao/common/adapter/RefreshAdapter.java
index 5e28ba8f6..a0d174681 100644
--- a/common/src/main/java/com/yunbao/common/adapter/RefreshAdapter.java
+++ b/common/src/main/java/com/yunbao/common/adapter/RefreshAdapter.java
@@ -67,6 +67,13 @@ public abstract class RefreshAdapter extends RecyclerView.Adapter {
}
}
+ public void refreshDel(){
+ if (mRecyclerView != null) {
+ notifyDataSetChanged();
+ }
+ }
+
+
public void refreshData(List list) {
if (mRecyclerView != null && list != null) {
mList.clear();
diff --git a/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java b/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java
new file mode 100644
index 000000000..0cc916894
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/adapter/SudGameChatAdapter.java
@@ -0,0 +1,122 @@
+package com.yunbao.common.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.R;
+import com.yunbao.common.bean.SudGameChatImModel;
+import com.yunbao.common.views.SudGameChatViewHolder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SudGameChatAdapter extends RecyclerView.Adapter {
+ private boolean isBottom = false;
+ List sudGameChatImModels = new ArrayList<>();
+ private RecyclerView mRecyclerView;
+ private LinearLayoutManager mLayoutManager;
+ private int mRecyclerViewScrolledDy;
+ private Context mContext;
+
+ public SudGameChatAdapter(Context mContext) {
+ this.mContext = mContext;
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_chat_item_holder, parent, false);
+ return new SudGameChatViewHolder(herdView);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+ if (holder instanceof SudGameChatViewHolder) {
+ SudGameChatViewHolder itemViewHolder = (SudGameChatViewHolder) holder;
+ itemViewHolder.sudGameChat(sudGameChatImModels.get(position));
+
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return sudGameChatImModels.size();
+ }
+
+ @Override
+ public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
+ mRecyclerView = recyclerView;
+ mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
+ mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+ @Override
+ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
+ super.onScrolled(recyclerView, dx, dy);
+ if (isBottom && dy >= 0) return;
+ mRecyclerViewScrolledDy = dy;
+ isBottom = false;
+
+ }
+
+ @Override
+ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
+ super.onScrollStateChanged(recyclerView, newState);
+ if (newState == 0 && isSlideToBottom(recyclerView)) {
+ mRecyclerViewScrolledDy = 0;
+ scrollToBottom();
+ isBottom = true;
+ } else if (newState == 0) {
+ isBottom = false;
+ }
+ }
+ });
+ }
+
+ public synchronized void insertItem(SudGameChatImModel bean) {
+ if (bean == null) {
+ return;
+ }
+ int size = sudGameChatImModels.size();
+ //设置最大展示99条消息
+ if (size >= 100 && (isBottom || mRecyclerViewScrolledDy == 0)) {
+
+ sudGameChatImModels.subList(0, 50).clear();
+ notifyItemRangeRemoved(0, 50);
+ }
+ sudGameChatImModels.add(bean);
+ if (getItemCount() == 1) {
+ notifyDataSetChanged();
+ } else {
+ notifyItemInserted(getItemCount());
+ }
+ if (isBottom || mRecyclerViewScrolledDy == 0) {
+ scrollToBottom();
+ }
+ }
+
+ /**
+ * 判断是否滚到底部
+ *
+ * @param recyclerView
+ * @return
+ */
+ public boolean isSlideToBottom(RecyclerView recyclerView) {
+ if (recyclerView == null) return false;
+ if (recyclerView.computeVerticalScrollExtent() + recyclerView.computeVerticalScrollOffset() >= recyclerView.computeVerticalScrollRange())
+ return true;
+ return false;
+ }
+
+ public void scrollToBottom() {
+ if (sudGameChatImModels.size() > 0) {
+ mRecyclerView.smoothScrollToPosition(getItemCount());
+ }
+ mRecyclerViewScrolledDy = 0;
+ }
+
+}
diff --git a/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java
new file mode 100644
index 000000000..e8893b9f1
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/adapter/SudGameUserListAdapter.java
@@ -0,0 +1,135 @@
+package com.yunbao.common.adapter;
+
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.yunbao.common.R;
+import com.yunbao.common.bean.SudGameUserModel;
+import com.yunbao.common.views.SudGameUserListViewHolder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SudGameUserListAdapter extends RecyclerView.Adapter {
+ private List gameUserModels = new ArrayList<>();
+ private boolean micMax = false;
+
+ public SudGameUserListAdapter(List gameUserModels) {
+
+ if (gameUserModels.size() < 7) {
+ this.gameUserModels.addAll(gameUserModels);
+ for (int i = 0; i < this.gameUserModels.size(); i++) {
+ this.gameUserModels.get(i).setNullUser(false);
+ }
+ int size = 7 - gameUserModels.size();
+ for (int i = 0; i < size; i++) {
+ this.gameUserModels.add(new SudGameUserModel().setNullUser(true));
+ }
+ } else if (gameUserModels.size() == 7) {
+ this.gameUserModels.addAll(gameUserModels);
+ for (int i = 0; i < this.gameUserModels.size(); i++) {
+ this.gameUserModels.get(i).setNullUser(false);
+ }
+ } else {
+ for (int i = 0; i < 7; i++) {
+ this.gameUserModels.add(gameUserModels.get(i).setNullUser(false));
+ }
+ }
+
+ }
+
+ public void refreshSudGameUserList(List gameUserModels, List muteUser) {
+ this.gameUserModels.clear();
+ if (gameUserModels.size() < 7) {
+ micMax = false;
+ this.gameUserModels.addAll(gameUserModels);
+ for (int i = 0; i < this.gameUserModels.size(); i++) {
+ for (String userID : muteUser) {
+ if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) {
+ this.gameUserModels.get(i).setMute(true);
+ }
+
+ }
+ this.gameUserModels.get(i).setNullUser(false);
+ }
+ int size = 7 - gameUserModels.size();
+ for (int i = 0; i < size; i++) {
+ this.gameUserModels.add(new SudGameUserModel().setNullUser(true));
+ }
+ } else if (gameUserModels.size() == 7) {
+ micMax = true;
+ this.gameUserModels.addAll(gameUserModels);
+ for (int i = 0; i < this.gameUserModels.size(); i++) {
+ this.gameUserModels.get(i).setNullUser(false);
+ }
+ } else {
+ micMax = true;
+
+ for (int i = 0; i < 7; i++) {
+ for (String userID : muteUser) {
+ if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) {
+ this.gameUserModels.get(i).setMute(true);
+ }
+
+ }
+ this.gameUserModels.add(gameUserModels.get(i).setNullUser(false));
+ }
+ }
+ notifyDataSetChanged();
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_user_list_holder, parent, false);
+ return new SudGameUserListViewHolder(herdView);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+ SudGameUserListViewHolder sudGameUserListViewHolder = (SudGameUserListViewHolder) holder;
+ sudGameUserListViewHolder.upData(gameUserModels.get(position), sudGameSmallCallBack, position);
+ }
+
+ @Override
+ public int getItemCount() {
+ return gameUserModels.size();
+ }
+
+ public boolean isMicMax() {
+ return micMax;
+ }
+
+ public void muteUser(String userID, boolean mute, int position) {
+ for (int i = 0; i < gameUserModels.size(); i++) {
+ SudGameUserModel sudGameUserModel = gameUserModels.get(i);
+ if (!sudGameUserModel.isNullUser()) {
+ if (TextUtils.equals(userID, String.valueOf(sudGameUserModel.getId()))) {
+ gameUserModels.get(i).setMute(mute);
+
+ }
+ }
+ }
+ notifyItemChanged(position);
+ }
+
+ private SudGameSmallCallBack sudGameSmallCallBack;
+
+ public SudGameUserListAdapter setSudGameSmallCallBack(SudGameSmallCallBack sudGameSmallCallBack) {
+ this.sudGameSmallCallBack = sudGameSmallCallBack;
+ return this;
+ }
+
+ public interface SudGameSmallCallBack {
+ void unMute(String userID, int position);
+
+ void mute(String userID, int position);
+
+ void viewInformation(SudGameUserModel sudGameUserModel);
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
index 80c69327c..8129692a6 100644
--- a/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
+++ b/common/src/main/java/com/yunbao/common/bean/AnchorRecommendModel.java
@@ -20,6 +20,12 @@ public class AnchorRecommendModel extends BaseModel {
@SerializedName("red_packet_show")
private int showRedPacket = 0;//是否显示首页红包浮窗
//是否支持换一批0=不支持 1=支持
+
+
+ @SerializedName("live_battle_pass_show_status")
+ private int showWarOrder = 0;//是否显示首页戰令
+ //是否支持换一批0=不支持 1=支持
+
@SerializedName("up_show")
private int upShow = 0;
@SerializedName("list")
@@ -40,6 +46,14 @@ public class AnchorRecommendModel extends BaseModel {
return this;
}
+ public int getShowWarOrder() {
+ return showWarOrder;
+ }
+
+ public void setShowWarOrder(int showWarOrder) {
+ this.showWarOrder = showWarOrder;
+ }
+
public int getListShow() {
return listShow;
}
diff --git a/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java b/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java
new file mode 100644
index 000000000..add65fdb2
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java
@@ -0,0 +1,175 @@
+package com.yunbao.common.bean;
+
+import com.google.gson.annotations.SerializedName;
+
+public class BattlePassPoints extends BaseModel{
+ private int id;
+ private int type;
+ @SerializedName("rewards_name")
+ private String rewardsName;
+ @SerializedName("rewards_id")
+ private int rewardsId;
+ @SerializedName("image_url")
+ private String imageUrl;
+ @SerializedName("points_threshold")
+ private String pointsThreshold;
+ @SerializedName("points_threshold_text")
+ private String pointsThresholdText;
+ @SerializedName("rewards_value")
+ private String rewardsValue;
+ @SerializedName("battle_pass_level")
+ private int battlePassLevel;
+ @SerializedName("exchange_quantity")
+ private int exchangeQuantity;
+ @SerializedName("live_battle_pass_type_id")
+ private int liveBattlePassTypeId;
+ private String description;
+ @SerializedName("restrict_time")
+ private int restrictTime;
+ private int sort;
+ @SerializedName("exchange_status")
+ private int exchangeStatus;
+ @SerializedName("user_quinty_count")
+ private int userQuintyCount;
+ @SerializedName("exchange_status_remark")
+ private String exchangeMark;
+
+ public BattlePassPoints() {
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ public String getRewardsName() {
+ return rewardsName;
+ }
+
+ public void setRewardsName(String rewardsName) {
+ this.rewardsName = rewardsName;
+ }
+
+ public int getRewardsId() {
+ return rewardsId;
+ }
+
+ public void setRewardsId(int rewardsId) {
+ this.rewardsId = rewardsId;
+ }
+
+ public String getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ public String getPointsThreshold() {
+ return pointsThreshold;
+ }
+
+ public void setPointsThreshold(String pointsThreshold) {
+ this.pointsThreshold = pointsThreshold;
+ }
+
+ public String getRewardsValue() {
+ return rewardsValue;
+ }
+
+ public void setRewardsValue(String rewardsValue) {
+ this.rewardsValue = rewardsValue;
+ }
+
+ public int getBattlePassLevel() {
+ return battlePassLevel;
+ }
+
+ public void setBattlePassLevel(int battlePassLevel) {
+ this.battlePassLevel = battlePassLevel;
+ }
+
+ public int getExchangeQuantity() {
+ return exchangeQuantity;
+ }
+
+ public void setExchangeQuantity(int exchangeQuantity) {
+ this.exchangeQuantity = exchangeQuantity;
+ }
+
+ public int getLiveBattlePassTypeId() {
+ return liveBattlePassTypeId;
+ }
+
+ public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
+ this.liveBattlePassTypeId = liveBattlePassTypeId;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public int getRestrictTime() {
+ return restrictTime;
+ }
+
+ public void setRestrictTime(int restrictTime) {
+ this.restrictTime = restrictTime;
+ }
+
+ public int getSort() {
+ return sort;
+ }
+
+ public void setSort(int sort) {
+ this.sort = sort;
+ }
+
+ public int getExchangeStatus() {
+ return exchangeStatus;
+ }
+
+ public void setExchangeStatus(int exchangeStatus) {
+ this.exchangeStatus = exchangeStatus;
+ }
+
+ public int getUserQuintyCount() {
+ return userQuintyCount;
+ }
+
+ public void setUserQuintyCount(int userQuintyCount) {
+ this.userQuintyCount = userQuintyCount;
+ }
+
+ public String getExchangeMark() {
+ return exchangeMark;
+ }
+
+ public void setExchangeMark(String exchangeMark) {
+ this.exchangeMark = exchangeMark;
+ }
+
+ public String getPointsThresholdText() {
+ return pointsThresholdText;
+ }
+
+ public void setPointsThresholdText(String pointsThresholdText) {
+ this.pointsThresholdText = pointsThresholdText;
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/BattlePassTask.java b/common/src/main/java/com/yunbao/common/bean/BattlePassTask.java
new file mode 100644
index 000000000..ae19dfe6c
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/BattlePassTask.java
@@ -0,0 +1,157 @@
+package com.yunbao.common.bean;
+
+import android.content.Context;
+
+import com.google.gson.annotations.SerializedName;
+import com.yunbao.common.utils.WordUtil;
+
+import java.util.List;
+
+public class BattlePassTask extends BaseModel {
+ private List daily;// 每日任务
+ private List season;// 每期任务
+
+ public BattlePassTask() {
+ }
+
+ public List getDaily() {
+ return daily;
+ }
+
+ public void setDaily(List daily) {
+ this.daily = daily;
+ }
+
+ public List getSeason() {
+ return season;
+ }
+
+ public void setSeason(List season) {
+ this.season = season;
+ }
+
+ public static class Task {
+ private int id;// 任务ID
+ private String type;// 任务类型
+ @SerializedName("task_success")
+ private int taskSuccess;// 任务可以重复的次数
+ @SerializedName("name_en")
+ private String nameEn;// 任务名称英文
+ @SerializedName("remark_en")
+ private String remarkEn;// 任务备注英文
+ private String name;// 任务名称中文
+ private String remark; // 任务备注中文
+ @SerializedName("image_path")
+ private String imagePath;// 图标path
+ @SerializedName("user_task_success")
+ private int userTaskSuccess;// 用户完成的任务次数
+ @SerializedName("received_task")
+ private int receivedTask;// 用户已经领取的任务数量
+ @SerializedName("not_received_task")
+ private int notReceivedTask; // 用户未领取的任务数量
+ public boolean isBuy(){
+ return taskSuccess==0;
+ }
+ public String getNameText(){
+ return WordUtil.isNewZh()?name:nameEn;
+ }
+ public String getRemarkText(){
+ return WordUtil.isNewZh()?remark:remarkEn;
+ }
+
+ public Task() {
+ }
+
+ public Task(int id) {
+ this.id = id;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public int getTaskSuccess() {
+ return taskSuccess;
+ }
+
+ public void setTaskSuccess(int taskSuccess) {
+ this.taskSuccess = taskSuccess;
+ }
+
+ public String getNameEn() {
+ return nameEn;
+ }
+
+ public void setNameEn(String nameEn) {
+ this.nameEn = nameEn;
+ }
+
+ public String getRemarkEn() {
+ return remarkEn;
+ }
+
+ public void setRemarkEn(String remarkEn) {
+ this.remarkEn = remarkEn;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public String getImagePath() {
+ return imagePath;
+ }
+
+ public void setImagePath(String imagePath) {
+ this.imagePath = imagePath;
+ }
+
+ public int getUserTaskSuccess() {
+ return userTaskSuccess;
+ }
+
+ public void setUserTaskSuccess(int userTaskSuccess) {
+ this.userTaskSuccess = userTaskSuccess;
+ }
+
+ public int getReceivedTask() {
+ return receivedTask;
+ }
+
+ public void setReceivedTask(int receivedTask) {
+ this.receivedTask = receivedTask;
+ }
+
+ public int getNotReceivedTask() {
+ return notReceivedTask;
+ }
+
+ public void setNotReceivedTask(int notReceivedTask) {
+ this.notReceivedTask = notReceivedTask;
+ }
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/BattlePassUserInfoBean.java b/common/src/main/java/com/yunbao/common/bean/BattlePassUserInfoBean.java
new file mode 100644
index 000000000..12ef62d04
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/BattlePassUserInfoBean.java
@@ -0,0 +1,199 @@
+package com.yunbao.common.bean;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class BattlePassUserInfoBean extends BaseModel{
+ private String uid;
+ private int points;
+ @SerializedName("battle_pass_exp")
+ private int battlePassExp;
+ @SerializedName("battle_pass_user_records_1")
+ private int battlePassUserRecords1;
+ @SerializedName("battle_pass_user_records_2")
+ private int battlePassUserRecords2;
+ @SerializedName("battle_pass_user_records_3")
+ private int battlePassUserRecords3;
+ private int level;
+ @SerializedName("last_level_exp")
+ private int lastLevelExp;
+ @SerializedName("next_level_exp")
+ private int nextLevelExp;
+ private String id;
+ @SerializedName("battle_pass_name")
+ private String battlePassName;
+ @SerializedName("start_time")
+ private String startTime;
+ @SerializedName("end_time")
+ private String endTime;
+ @SerializedName("battle_pass_status")
+ private boolean battlePassStatus;
+ @SerializedName("max_level_exp")
+ private long maxLevelExp;
+ @SerializedName("max_level")
+ private int maxLevel;
+
+ private List live_battle_pass_type;
+
+ public BattlePassUserInfoBean() {
+ }
+ public List getLive_battle_pass_type() {
+ return live_battle_pass_type;
+ }
+
+ public void setLive_battle_pass_type(List live_battle_pass_type) {
+ this.live_battle_pass_type = live_battle_pass_type;
+ }
+
+ public String getUid() {
+ return uid;
+ }
+
+ public void setUid(String uid) {
+ this.uid = uid;
+ }
+
+ public int getPoints() {
+ return points;
+ }
+
+ public void setPoints(int points) {
+ this.points = points;
+ }
+
+ public int getBattlePassExp() {
+ return battlePassExp;
+ }
+
+ public void setBattlePassExp(int battlePassExp) {
+ this.battlePassExp = battlePassExp;
+ }
+
+ public int getBattlePassUserRecords1() {
+ return battlePassUserRecords1;
+ }
+
+ public void setBattlePassUserRecords1(int battlePassUserRecords1) {
+ this.battlePassUserRecords1 = battlePassUserRecords1;
+ }
+
+ public int getBattlePassUserRecords2() {
+ return battlePassUserRecords2;
+ }
+
+ public void setBattlePassUserRecords2(int battlePassUserRecords2) {
+ this.battlePassUserRecords2 = battlePassUserRecords2;
+ }
+
+ public int getBattlePassUserRecords3() {
+ return battlePassUserRecords3;
+ }
+
+ public void setBattlePassUserRecords3(int battlePassUserRecords3) {
+ this.battlePassUserRecords3 = battlePassUserRecords3;
+ }
+
+ public int getLevel() {
+ return level;
+ }
+
+ public void setLevel(int level) {
+ this.level = level;
+ }
+
+ public int getLastLevelExp() {
+ return lastLevelExp;
+ }
+
+ public void setLastLevelExp(int lastLevelExp) {
+ this.lastLevelExp = lastLevelExp;
+ }
+
+ public int getNextLevelExp() {
+ return nextLevelExp;
+ }
+
+ public void setNextLevelExp(int nextLevelExp) {
+ this.nextLevelExp = nextLevelExp;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getBattlePassName() {
+ return battlePassName;
+ }
+
+ public void setBattlePassName(String battlePassName) {
+ this.battlePassName = battlePassName;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public boolean isBattlePassStatus() {
+ return battlePassStatus;
+ }
+
+ public void setBattlePassStatus(boolean battlePassStatus) {
+ this.battlePassStatus = battlePassStatus;
+ }
+
+ public long getMaxLevelExp() {
+ return maxLevelExp;
+ }
+
+ public void setMaxLevelExp(long maxLevelExp) {
+ this.maxLevelExp = maxLevelExp;
+ }
+
+ public int getMaxLevel() {
+ return maxLevel;
+ }
+
+ public void setMaxLevel(int maxLevel) {
+ this.maxLevel = maxLevel;
+ }
+
+ @Override
+ public String toString() {
+ return "BattlePassUserInfoBean{" +
+ "uid='" + uid + '\'' +
+ ", points=" + points +
+ ", battlePassExp=" + battlePassExp +
+ ", battlePassUserRecords1=" + battlePassUserRecords1 +
+ ", battlePassUserRecords2=" + battlePassUserRecords2 +
+ ", battlePassUserRecords3=" + battlePassUserRecords3 +
+ ", level=" + level +
+ ", lastLevelExp=" + lastLevelExp +
+ ", nextLevelExp=" + nextLevelExp +
+ ", id='" + id + '\'' +
+ ", battlePassName='" + battlePassName + '\'' +
+ ", startTime='" + startTime + '\'' +
+ ", endTime='" + endTime + '\'' +
+ ", battlePassStatus=" + battlePassStatus +
+ ", maxLevelExp=" + maxLevelExp +
+ ", maxLevel=" + maxLevel +
+ ", live_battle_pass_type=" + live_battle_pass_type +
+ '}';
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java
index 611c289ef..49d49043a 100644
--- a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java
+++ b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java
@@ -36,4 +36,13 @@ public class CheckRemainingBalance extends BaseModel {
public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) {
this.goldenBeanRemainingBalance = goldenBeanRemainingBalance;
}
+
+ @Override
+ public String toString() {
+ return "CheckRemainingBalance{" +
+ "goldenBeanRemainingBalance=" + goldenBeanRemainingBalance +
+ ", status=" + status +
+ ", deductMoneyKey='" + deductMoneyKey + '\'' +
+ '}';
+ }
}
diff --git a/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java b/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java
new file mode 100644
index 000000000..3deed7e93
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java
@@ -0,0 +1,175 @@
+package com.yunbao.common.bean;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+import java.util.Map;
+
+public class LiveBattlePassRewardsBean extends BaseModel{
+ private int level;
+ private List live_battle_pass_type;
+ private Map> live_battle_pass_rewards;
+
+ public LiveBattlePassRewardsBean() {
+ }
+
+ public int getLevel() {
+ return level;
+ }
+
+ public void setLevel(int level) {
+ this.level = level;
+ }
+
+ public List getLive_battle_pass_type() {
+ return live_battle_pass_type;
+ }
+
+ public void setLive_battle_pass_type(List live_battle_pass_type) {
+ this.live_battle_pass_type = live_battle_pass_type;
+ }
+
+ public Map> getLive_battle_pass_rewards() {
+ return live_battle_pass_rewards;
+ }
+
+ public void setLive_battle_pass_rewards(Map> live_battle_pass_rewards) {
+ this.live_battle_pass_rewards = live_battle_pass_rewards;
+ }
+
+ public static class BattlePassType extends BaseModel{
+ private int id;
+ private String battle_pass_name;
+ private int sort;
+ private int diamond_value;
+ private int lock;
+
+ public BattlePassType() {
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getBattle_pass_name() {
+ return battle_pass_name;
+ }
+
+ public void setBattle_pass_name(String battle_pass_name) {
+ this.battle_pass_name = battle_pass_name;
+ }
+
+ public int getSort() {
+ return sort;
+ }
+
+ public void setSort(int sort) {
+ this.sort = sort;
+ }
+
+ public int getDiamond_value() {
+ return diamond_value;
+ }
+
+ public void setDiamond_value(int diamond_value) {
+ this.diamond_value = diamond_value;
+ }
+
+ public int getLock() {
+ return lock;
+ }
+
+ public void setLock(int lock) {
+ this.lock = lock;
+ }
+ }
+ public static class LiveBattlePassReward extends BaseModel{
+ private int id;
+ @SerializedName("live_battle_pass_level")
+ private int liveBattlePassLevel;
+ @SerializedName("live_battle_pass_type_id")
+ private int liveBattlePassTypeId;
+ @SerializedName("reward_name")
+ private String rewardName;
+ @SerializedName("image_url")
+ private String imageUrl;
+ private int lock;
+ private int received;
+
+ public LiveBattlePassReward() {
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public int getLiveBattlePassLevel() {
+ return liveBattlePassLevel;
+ }
+
+ public void setLiveBattlePassLevel(int liveBattlePassLevel) {
+ this.liveBattlePassLevel = liveBattlePassLevel;
+ }
+
+ public int getLiveBattlePassTypeId() {
+ return liveBattlePassTypeId;
+ }
+
+ public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
+ this.liveBattlePassTypeId = liveBattlePassTypeId;
+ }
+
+ public String getRewardName() {
+ return rewardName;
+ }
+
+ public void setRewardName(String rewardName) {
+ this.rewardName = rewardName;
+ }
+
+ public String getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ public int getLock() {
+ return lock;
+ }
+
+ public void setLock(int lock) {
+ this.lock = lock;
+ }
+
+ public int getReceived() {
+ return received;
+ }
+
+ public void setReceived(int received) {
+ this.received = received;
+ }
+
+ @Override
+ public String toString() {
+ return "LiveBattlePassReward{" +
+ "id=" + id +
+ ", liveBattlePassLevel=" + liveBattlePassLevel +
+ ", liveBattlePassTypeId=" + liveBattlePassTypeId +
+ ", rewardName='" + rewardName + '\'' +
+ ", imageUrl='" + imageUrl + '\'' +
+ ", lock=" + lock +
+ ", received=" + received +
+ '}';
+ }
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java b/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java
index 3ff79aa6f..b83db90a2 100644
--- a/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java
+++ b/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java
@@ -20,6 +20,14 @@ public class LiveClassBean {
@SerializedName("channel_show")
private int channel_show;
+ public LiveClassBean() {
+ }
+
+ public LiveClassBean(String chinese, String english) {
+ this.chinese = chinese;
+ this.english = english;
+ }
+
public String getChinese() {
return chinese;
}
diff --git a/common/src/main/java/com/yunbao/common/bean/LiveGiftBean.java b/common/src/main/java/com/yunbao/common/bean/LiveGiftBean.java
index 31c65e757..ee8b51204 100644
--- a/common/src/main/java/com/yunbao/common/bean/LiveGiftBean.java
+++ b/common/src/main/java/com/yunbao/common/bean/LiveGiftBean.java
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
import android.view.View;
import com.alibaba.fastjson.annotation.JSONField;
+import com.google.gson.annotations.SerializedName;
/**
* Created by cxf on 2018/10/12.
@@ -18,6 +19,8 @@ public class LiveGiftBean {
// public static final int MARK_LUCK = 3;
private int id;
+ @SerializedName("gift_id")
+ private int gift_id;//包裹礼物id
private int type;//0 普通礼物 1是贵族 2守护 3粉丝团 5盲盒礼物
private int mark;// 0 普通 1热门 2守护 3幸运
private String name;
@@ -34,6 +37,7 @@ public class LiveGiftBean {
private String isweek;
private String end_time;
private String tag;
+ private boolean isPageGift;
@JSONField(name = "blind_box_type")
private int blind_box_type = 0;
//礼物角标
@@ -71,6 +75,14 @@ public class LiveGiftBean {
@JSONField(name = "blind_box_ticket_id")
private int blindBoxTicketId;
+ public boolean isPageGift() {
+ return isPageGift;
+ }
+
+ public void setPageGift(boolean pageGift) {
+ isPageGift = pageGift;
+ }
+
public int getBlindBoxTicketId() {
return blindBoxTicketId;
}
@@ -80,6 +92,14 @@ public class LiveGiftBean {
return this;
}
+ public int getGift_id() {
+ return gift_id;
+ }
+
+ public void setGift_id(int gift_id) {
+ this.gift_id = gift_id;
+ }
+
public int getBlindBoxTicket() {
return blindBoxTicket;
}
diff --git a/common/src/main/java/com/yunbao/common/bean/RoomMicStatusModel.java b/common/src/main/java/com/yunbao/common/bean/RoomMicStatusModel.java
new file mode 100644
index 000000000..6292156a5
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/RoomMicStatusModel.java
@@ -0,0 +1,27 @@
+package com.yunbao.common.bean;
+
+import com.google.gson.annotations.SerializedName;
+
+public class RoomMicStatusModel extends BaseModel{
+
+ @SerializedName("mic_status")
+ private String micStatus;
+ @SerializedName("im_status")
+ private String imStatus;
+
+ public String getMicStatus() {
+ return micStatus;
+ }
+
+ public void setMicStatus(String micStatus) {
+ this.micStatus = micStatus;
+ }
+
+ public String getImStatus() {
+ return imStatus;
+ }
+
+ public void setImStatus(String imStatus) {
+ this.imStatus = imStatus;
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java
new file mode 100644
index 000000000..e55ee691d
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/SudGameChatImModel.java
@@ -0,0 +1,26 @@
+package com.yunbao.common.bean;
+
+public class SudGameChatImModel extends BaseModel {
+ //昵称
+ private String nickname;
+ //文字消息
+ private String textMessage;
+
+ public String getNickname() {
+ return nickname;
+ }
+
+ public SudGameChatImModel setNickname(String nickname) {
+ this.nickname = nickname;
+ return this;
+ }
+
+ public String getTextMessage() {
+ return textMessage;
+ }
+
+ public SudGameChatImModel setTextMessage(String textMessage) {
+ this.textMessage = textMessage;
+ return this;
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java
new file mode 100644
index 000000000..a614ee9d7
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/bean/SudGameUserModel.java
@@ -0,0 +1,82 @@
+package com.yunbao.common.bean;
+
+import com.google.gson.annotations.SerializedName;
+
+public class SudGameUserModel extends BaseModel {
+ private boolean nullUser;
+ @SerializedName("user_nicename")
+ private String userNicename;
+ @SerializedName("avatar")
+ private String avatar;
+ @SerializedName("sex")
+ private int sex;
+ @SerializedName("id")
+ private int id;
+ @SerializedName("mic_status")
+ private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风
+
+ private boolean mute = false;
+
+ public boolean isMute() {
+ return mute;
+ }
+
+ public SudGameUserModel setMute(boolean mute) {
+ this.mute = mute;
+ return this;
+ }
+
+ public boolean isNullUser() {
+ return nullUser;
+ }
+
+ public SudGameUserModel setNullUser(boolean nullUser) {
+ this.nullUser = nullUser;
+ return this;
+ }
+
+ public String getUserNicename() {
+ return userNicename;
+ }
+
+ public SudGameUserModel setUserNicename(String userNicename) {
+ this.userNicename = userNicename;
+ return this;
+ }
+
+ public String getAvatar() {
+ return avatar;
+ }
+
+ public SudGameUserModel setAvatar(String avatar) {
+ this.avatar = avatar;
+ return this;
+ }
+
+ public int getSex() {
+ return sex;
+ }
+
+ public SudGameUserModel setSex(int sex) {
+ this.sex = sex;
+ return this;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public SudGameUserModel setId(int id) {
+ this.id = id;
+ return this;
+ }
+
+ public int getMicStatus() {
+ return micStatus;
+ }
+
+ public SudGameUserModel setMicStatus(int micStatus) {
+ this.micStatus = micStatus;
+ return this;
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/dialog/ActivateEliteBattleOrderPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/ActivateEliteBattleOrderPopupWindow.java
new file mode 100644
index 000000000..cfe1e3c4e
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/dialog/ActivateEliteBattleOrderPopupWindow.java
@@ -0,0 +1,88 @@
+package com.yunbao.common.dialog;
+
+import android.app.Activity;
+import android.content.Context;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.ImageSpan;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+import com.lxj.xpopup.XPopup;
+import com.lxj.xpopup.core.CenterPopupView;
+import com.yunbao.common.R;
+import com.yunbao.common.utils.DeviceUtils;
+import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.common.views.weight.ViewClicksAntiShake;
+
+public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
+ private boolean elites;//是否精英战令
+ private String spendMoney;//花费钱
+ private View buttonWarOrder;
+ private LiberalBattlePassPopupWindow.LiberalBattlePassCallback mPassCallback;
+ private String mBattlePassTypeId;
+
+ public ActivateEliteBattleOrderPopupWindow(@NonNull Context context, String mSpendMoney,
+ boolean elites,
+ LiberalBattlePassPopupWindow.LiberalBattlePassCallback passCallback
+ , String battlePassTypeId) {
+ super(context);
+ this.elites = elites;
+ spendMoney = mSpendMoney;
+ mPassCallback=passCallback;
+ mBattlePassTypeId = battlePassTypeId;
+ }
+
+ @Override
+ protected int getImplLayoutId() {
+ return R.layout.activate_elite_battle_order_popup;
+ }
+
+ // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ buttonWarOrder = findViewById(R.id.button_war_order);
+ if (elites) {
+ findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
+ findViewById(R.id.gift_overvalue3).setVisibility(GONE);
+ findViewById(R.id.enjoy_image).setVisibility(GONE);
+ findViewById(R.id.elites_image).setVisibility(VISIBLE);
+ findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
+ ((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts));
+ } else {
+ findViewById(R.id.gift_overvalue).setVisibility(GONE);
+ findViewById(R.id.gift_overvalue3).setVisibility(VISIBLE);
+ findViewById(R.id.enjoy_image).setVisibility(VISIBLE);
+ findViewById(R.id.elites_image).setVisibility(GONE);
+ findViewById(R.id.gift_overvalue).setVisibility(GONE);
+ ((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts2));
+ }
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.war_order_close), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ dialog.dismiss();
+ }
+ });
+ //中文按钮文字
+
+ ((TextView)findViewById(R.id.button_war_order_text)).setText(spendMoney);
+
+ ViewClicksAntiShake.clicksAntiShake(buttonWarOrder, new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ dialog.dismiss();
+ new XPopup.Builder(getContext())
+ .enableDrag(false)
+ .maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
+ .asCustom(new LiberalBattlePassPopupWindow(getContext(), spendMoney, elites,mPassCallback,mBattlePassTypeId))
+ .show();
+ }
+ });
+
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/dialog/ActivityEndPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/ActivityEndPopupWindow.java
new file mode 100644
index 000000000..3993f2911
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/dialog/ActivityEndPopupWindow.java
@@ -0,0 +1,35 @@
+package com.yunbao.common.dialog;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+
+import com.lxj.xpopup.core.CenterPopupView;
+import com.yunbao.common.R;
+import com.yunbao.common.views.weight.ViewClicksAntiShake;
+
+/**
+ * 活动结束
+ */
+public class ActivityEndPopupWindow extends CenterPopupView {
+ public ActivityEndPopupWindow(@NonNull Context context) {
+ super(context);
+ }
+
+ @Override
+ protected int getImplLayoutId() {
+ return R.layout.activity_end_popup;
+ }
+
+ // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ dialog.dismiss();
+ }
+ });
+ }
+}
diff --git a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java
index 6b6026048..d265f74ea 100644
--- a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java
+++ b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java
@@ -21,7 +21,6 @@ import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
import com.lxj.xpopup.enums.PopupPosition;
import com.yunbao.common.R;
-import com.yunbao.common.activity.SudGameActivity;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.event.CheckCurrencyModel;
@@ -33,6 +32,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus;
+import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@@ -279,9 +279,7 @@ public class CreateSudGamePopup extends BottomPopupView {
public void onSuccess(CreateSudRoomModel data) {
if (isHome) {
dialog.dismiss();
- Intent intent = new Intent(getContext(), SudGameActivity.class);
- intent.putExtra("CreateSudRoom", new Gson().toJson(data));
- getContext().startActivity(intent);
+ RouteUtil.forwardSudGameActivity(new Gson().toJson(data));
} else {
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
diff --git a/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java
new file mode 100644
index 000000000..fb0a87a5e
--- /dev/null
+++ b/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java
@@ -0,0 +1,101 @@
+package com.yunbao.common.dialog;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.text.style.ForegroundColorSpan;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+import com.lxj.xpopup.core.CenterPopupView;
+import com.yunbao.common.R;
+import com.yunbao.common.http.ResponseModel;
+import com.yunbao.common.http.base.HttpCallback;
+import com.yunbao.common.http.live.LiveNetManager;
+import com.yunbao.common.manager.IMLoginManager;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.common.views.weight.ViewClicksAntiShake;
+
+public class LiberalBattlePassPopupWindow extends CenterPopupView {
+ private String spendMoney;//花费钱
+ private boolean mElites;//是否精英战令
+ private TextView liberalBattlePass;
+ private LiberalBattlePassCallback mPassCallback;
+ private String mBattlePassTypeId;
+
+ public LiberalBattlePassPopupWindow(@NonNull Context context, String mSpendMoney, boolean elites, LiberalBattlePassCallback passCallback, String battlePassTypeId) {
+ super(context);
+ spendMoney = mSpendMoney;
+ mElites = elites;
+ mPassCallback = passCallback;
+ mBattlePassTypeId = battlePassTypeId;
+ }
+
+ protected int getImplLayoutId() {
+ return R.layout.liberal_battle_pass_popup;
+ }
+
+ // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
+ @Override
+ protected void onCreate() {
+ super.onCreate();
+ liberalBattlePass = findViewById(R.id.liberal_battle_pass);
+ //中文版
+ StringBuffer liberalBattlePassHint = new StringBuffer();
+ liberalBattlePassHint.append(WordUtil.isNewZh()?"是否花費":"Did you spend ");
+ liberalBattlePassHint.append(spendMoney).append(mElites ?
+ WordUtil.isNewZh()?"鑽石開通精英戰令!":"diamonds to activate the Elite BattlePass":
+ WordUtil.isNewZh()?"鑽石開通尊享戰令!":"diamonds to activate the Luxury BattlePass");
+ //英文版
+
+ //设置样式
+ String liberalBattlePassStr = liberalBattlePassHint.toString();
+ SpannableStringBuilder builder = new SpannableStringBuilder();
+ builder.append(liberalBattlePassStr);
+ int spendMoneyIndex = liberalBattlePassStr.indexOf(spendMoney);
+ int spendMoneySize = spendMoneyIndex + spendMoney.length();
+ builder.setSpan(new ForegroundColorSpan(Color.parseColor("#CE2BFF")), spendMoneyIndex, spendMoneySize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ liberalBattlePass.setText(builder);
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cancel), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ dialog.dismiss();
+ }
+ });
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.liberal_battle_sure), new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ LiveNetManager.get(getContext()).
+ upgradesBattlePass(mBattlePassTypeId, new HttpCallback>() {
+ @Override
+ public void onSuccess(ResponseModel