Compare commits
67 Commits
master_sud
...
dev_6.6.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c5ae3b61a | |||
|
|
2857bb09a2 | ||
|
|
79c1c01003 | ||
| a2864187ed | |||
|
|
05e7c4ffdd | ||
|
|
b4b1efe730 | ||
|
|
2ab1b31a94 | ||
|
|
f1645cf72c | ||
|
|
cd35b9e40f | ||
|
|
33bce43737 | ||
|
|
1f8025599b | ||
|
|
71a7b47d42 | ||
|
|
59446d2518 | ||
|
|
8a8a7a8326 | ||
|
|
089b1881f1 | ||
|
|
7b1f3ddd79 | ||
|
|
56ae033523 | ||
|
|
f772a64507 | ||
|
|
8c75317ddc | ||
|
|
256c19a09e | ||
|
|
82c1d15ca5 | ||
|
|
aff5a178a0 | ||
|
|
04b1764f7b | ||
|
|
076f7130c8 | ||
|
|
b7842d5ac9 | ||
|
|
eb5aebda51 | ||
|
|
6990bd13ed | ||
|
|
c18af48fbb | ||
|
|
68e6f5df1b | ||
|
|
dc46ffc5b6 | ||
|
|
c58a5a9a55 | ||
|
|
e2ee742091 | ||
|
|
bcc86a899c | ||
|
|
b60031d2d0 | ||
|
|
54aa5fee67 | ||
|
|
816fd21fbc | ||
|
|
92e6b563e4 | ||
|
|
d7bc2615d6 | ||
|
|
21473b1d69 | ||
|
|
9bdee649d8 | ||
|
|
f1a8cd3a68 | ||
|
|
a39005b1a9 | ||
|
|
ec1197e5da | ||
|
|
45372f37b8 | ||
|
|
df93b9495a | ||
|
|
86d730cdf1 | ||
|
|
f356446c03 | ||
|
|
bf7bc6b786 | ||
|
|
6a3c15e3e7 | ||
|
|
07d3b190e2 | ||
|
|
27b316d39b | ||
|
|
f928fcd4bc | ||
|
|
adcafc7e16 | ||
|
|
b191dfb1be | ||
|
|
192b0cb417 | ||
|
|
a2435cbe95 | ||
|
|
8925d478da | ||
|
|
926de0463c | ||
|
|
993b09b853 | ||
|
|
e6c8495158 | ||
|
|
e15953dc64 | ||
|
|
4ff529ace9 | ||
|
|
530622c72c | ||
|
|
7f38739ddc | ||
|
|
bc549d52f6 | ||
|
|
14f0de093e | ||
|
|
51457738d2 |
@@ -392,6 +392,15 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
mPlayer = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mLauncherAdViewHolder != null) {
|
||||
mLauncherAdViewHolder.release();
|
||||
checkUidAndToken();
|
||||
return;
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放广告
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.yunbao.common.bean.NotificationMsgBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -92,7 +93,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
||||
if (AppContext.activityWeakReference != null) {
|
||||
Activity activity = AppContext.activityWeakReference.get();
|
||||
if (activity != null) {
|
||||
DialogUitl.showSimpleDialog(activity, "应用需要通知权限", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(activity, WordUtil.isNewZh()?"应用需要通知权限":"Application requires notification permission", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
Intent intent = new Intent();
|
||||
|
||||
@@ -56,9 +56,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||
//谷歌推送
|
||||
PushConfig gconfig = new PushConfig.Builder()
|
||||
.enableFCM(true)
|
||||
.build();
|
||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||
RongPushClient.setPushConfig(gconfig);
|
||||
//初始化友盟统计
|
||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||
@@ -86,6 +84,9 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
}
|
||||
|
||||
public static Activity getTopActivity() {
|
||||
if (activityWeakReference == null) {
|
||||
return null;
|
||||
}
|
||||
return activityWeakReference.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,13 @@ 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;
|
||||
@@ -22,11 +25,13 @@ 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;
|
||||
|
||||
@@ -39,7 +44,6 @@ public class SudGameActivity extends AbsActivity {
|
||||
private CreateSudRoomModel mCreateSudRoomModel;
|
||||
private TextView gameTitle, roomName, roomNumber;
|
||||
private RoundedImageView mAvatar;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_sud_game;
|
||||
@@ -50,8 +54,28 @@ public class SudGameActivity extends AbsActivity {
|
||||
Bus.getOn(this);
|
||||
super.main();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
private void initDate() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getCustomSidebarInfo("1", new HttpCallback<List<CustomSidebarInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<CustomSidebarInfoModel> 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);
|
||||
@@ -82,6 +106,15 @@ public class SudGameActivity extends AbsActivity {
|
||||
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<View>() {
|
||||
@Override
|
||||
public void onChanged(View view) {
|
||||
@@ -97,9 +130,12 @@ public class SudGameActivity extends AbsActivity {
|
||||
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);
|
||||
@@ -117,32 +153,60 @@ public class SudGameActivity extends AbsActivity {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
|
||||
if (event.getResults().size() > 0) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
@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("Insufficient money ");
|
||||
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<CheckRemainingBalance>() {
|
||||
@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("Insufficient 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<CheckRemainingBalance>() {
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ import com.yunbao.common.views.RecommendViewHolder;
|
||||
import com.yunbao.common.views.RigtsInterestsViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新侧边栏适配器
|
||||
@@ -108,9 +110,13 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||
recommendViewHolder.setListener(new RecommendViewHolder.RecommendViewListener() {
|
||||
@Override
|
||||
public void changeOneBatch() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("num", "9");
|
||||
map.put("live_recommend", "sidebar");
|
||||
map.put("refresh", "1");
|
||||
//推荐位
|
||||
MainNetManager.get((Activity) mContext)
|
||||
.anchorRecommend("9", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
.anchorRecommend(map, new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GameRecordModel;
|
||||
import com.yunbao.common.views.LiveSudGameHistoryViewHolder;
|
||||
|
||||
public class LiveSudGameHistoryAdapter extends RefreshAdapter<GameRecordModel> {
|
||||
|
||||
public LiveSudGameHistoryAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new LiveSudGameHistoryViewHolder(mInflater.inflate(R.layout.item_live_sud_game_history, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveSudGameHistoryViewHolder sudGameListViewHolder = (LiveSudGameHistoryViewHolder) holder;
|
||||
sudGameListViewHolder.setData(mList.get(position));
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,38 @@ package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class CheckRemainingBalance extends BaseModel{
|
||||
public class CheckRemainingBalance extends BaseModel {
|
||||
|
||||
@SerializedName("golden_bean_remaining_balance")
|
||||
private int goldenBeanRemainingBalance;
|
||||
@SerializedName("golden_bean_remaining_balance")
|
||||
private int goldenBeanRemainingBalance;
|
||||
@SerializedName("status")
|
||||
private int status;
|
||||
@SerializedName("deduct_money_key")
|
||||
private String deductMoneyKey;
|
||||
|
||||
public int getGoldenBeanRemainingBalance() {
|
||||
return goldenBeanRemainingBalance;
|
||||
}
|
||||
public String getDeductMoneyKey() {
|
||||
return deductMoneyKey;
|
||||
}
|
||||
|
||||
public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) {
|
||||
this.goldenBeanRemainingBalance = goldenBeanRemainingBalance;
|
||||
}
|
||||
public CheckRemainingBalance setDeductMoneyKey(String deductMoneyKey) {
|
||||
this.deductMoneyKey = deductMoneyKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public CheckRemainingBalance setStatus(int status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGoldenBeanRemainingBalance() {
|
||||
return goldenBeanRemainingBalance;
|
||||
}
|
||||
|
||||
public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) {
|
||||
this.goldenBeanRemainingBalance = goldenBeanRemainingBalance;
|
||||
}
|
||||
}
|
||||
|
||||
24
common/src/main/java/com/yunbao/common/bean/CoolConfig.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class CoolConfig extends BaseModel {
|
||||
private int rate;
|
||||
private String ticketCount="0" ;
|
||||
|
||||
public String getTicketCount() {
|
||||
return ticketCount;
|
||||
}
|
||||
|
||||
public CoolConfig setTicketCount(String ticketCount) {
|
||||
this.ticketCount = ticketCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
public CoolConfig setRate(int rate) {
|
||||
this.rate = rate;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -47,10 +47,14 @@ public class CreateSudRoomModel extends BaseModel {
|
||||
}
|
||||
|
||||
public long getLongSudGameId() {
|
||||
if (TextUtils.isEmpty(sudGameId)) {
|
||||
try {
|
||||
if (TextUtils.isEmpty(sudGameId)) {
|
||||
return 0;
|
||||
} else {
|
||||
return Long.parseLong(sudGameId);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
return 0;
|
||||
} else {
|
||||
return Long.parseLong(sudGameId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,39 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private String sudGameRoomStatus;
|
||||
@SerializedName("sud_game_room_name")
|
||||
private String sudGameRoomName;
|
||||
@SerializedName("sud_gameDate")
|
||||
private SudGameDateModel sudGameDateModel;
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
|
||||
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIfViewingDurationComplete() {
|
||||
return ifViewingDurationComplete;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
|
||||
this.ifViewingDurationComplete = ifViewingDurationComplete;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SudGameDateModel getSudGameDateModel() {
|
||||
return sudGameDateModel;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setSudGameDateModel(SudGameDateModel sudGameDateModel) {
|
||||
this.sudGameDateModel = sudGameDateModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudGameRoomName() {
|
||||
return sudGameRoomName;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GameRecordModel extends BaseModel{
|
||||
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
@SerializedName("currency_type")
|
||||
private int currencyType;
|
||||
@SerializedName("settlement")
|
||||
private int settlement;
|
||||
@SerializedName("game_end_time")
|
||||
private String gameEndTime;
|
||||
@SerializedName("user_name")
|
||||
private List<String> userName;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int getCurrencyType() {
|
||||
return currencyType;
|
||||
}
|
||||
|
||||
public void setCurrencyType(int currencyType) {
|
||||
this.currencyType = currencyType;
|
||||
}
|
||||
|
||||
public int getSettlement() {
|
||||
return settlement;
|
||||
}
|
||||
|
||||
public void setSettlement(int settlement) {
|
||||
this.settlement = settlement;
|
||||
}
|
||||
|
||||
public String getGameEndTime() {
|
||||
return gameEndTime;
|
||||
}
|
||||
|
||||
public void setGameEndTime(String gameEndTime) {
|
||||
this.gameEndTime = gameEndTime;
|
||||
}
|
||||
|
||||
public List<String> getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(List<String> userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ public class IMLoginModel extends BaseModel {
|
||||
@SerializedName("votes")
|
||||
private String votes;
|
||||
@SerializedName("yuanbao")
|
||||
private long yuanbao;
|
||||
private String yuanbao;
|
||||
@SerializedName("list")
|
||||
private List<List<ListModel>> list;
|
||||
@SerializedName("slide")
|
||||
@@ -825,11 +825,11 @@ public class IMLoginModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public long getYuanbao() {
|
||||
public String getYuanbao() {
|
||||
return yuanbao;
|
||||
}
|
||||
|
||||
public IMLoginModel setYuanbao(long yuanbao) {
|
||||
public IMLoginModel setYuanbao(String yuanbao) {
|
||||
this.yuanbao = yuanbao;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1,29 +1,45 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LinkMicUserBean extends BaseModel {
|
||||
@SerializedName("user_nicename")
|
||||
private String uname;
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("dress_avatar")
|
||||
private String dress_avatar;
|
||||
private String uid = "";
|
||||
private String action;
|
||||
@SerializedName("id")
|
||||
private String id;//连麦显示右侧头像时要用
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("uname")
|
||||
private String uname;
|
||||
@SerializedName("level")
|
||||
private int level;
|
||||
@SerializedName("sex")
|
||||
private int sex;
|
||||
@SerializedName("dress_avatar")
|
||||
private String dressAvatar;
|
||||
|
||||
public String getUname() {
|
||||
return uname;
|
||||
if (TextUtils.isEmpty(uname)){
|
||||
return userNicename;
|
||||
}else {
|
||||
return uname;
|
||||
}
|
||||
}
|
||||
|
||||
public void setUname(String uname) {
|
||||
public LinkMicUserBean setUname(String uname) {
|
||||
this.uname = uname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
@@ -34,28 +50,17 @@ public class LinkMicUserBean extends BaseModel {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
public String getUserNicename() {
|
||||
if (TextUtils.isEmpty(uname)){
|
||||
return userNicename;
|
||||
}else {
|
||||
return uname;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getDress_avatar() {
|
||||
return dress_avatar;
|
||||
}
|
||||
|
||||
public void setDress_avatar(String dress_avatar) {
|
||||
this.dress_avatar = dress_avatar;
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
@@ -74,25 +79,11 @@ public class LinkMicUserBean extends BaseModel {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
public String getDressAvatar() {
|
||||
return dressAvatar;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LinkMicUserBean{" +
|
||||
"uname='" + uname + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", dress_avatar='" + dress_avatar + '\'' +
|
||||
", uid='" + uid + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", id='" + id + '\'' +
|
||||
", level=" + level +
|
||||
", sex=" + sex +
|
||||
'}';
|
||||
public void setDressAvatar(String dressAvatar) {
|
||||
this.dressAvatar = dressAvatar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class NativeCallbackModel extends BaseModel{
|
||||
private String uid ;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public NativeCallbackModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -17,14 +17,17 @@ public class OpenAdModel extends BaseModel {
|
||||
public static final int MODEL_SQUARE = 1;//正方形
|
||||
public static final int MODEL_RECTANGLE = 2;//长方形
|
||||
public static final int MODEL_BOTTOM = 3;//底部
|
||||
public static final int SHOW_DEF = 1;//1. 杀死程序后弹出;
|
||||
public static final int SHOW_DIY = 2;//2. 自定义时间:自上次弹出弹窗后,00:00小时(范围:00:01小时-48:00小时)后再弹出(到时间后也需满足触发条件再弹出);
|
||||
public static final int SHOW_ONE = 3;//3. 仅弹出一次;
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("popup_location")
|
||||
private int type = TYPE_HOME;
|
||||
@SerializedName("activity_url")
|
||||
private String url;
|
||||
private String url;//点击跳转url
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
private String imageUrl;//图片url
|
||||
@SerializedName("display_time")
|
||||
private int showTime; //持续展示时间
|
||||
@SerializedName("delay_show_time")
|
||||
@@ -37,11 +40,48 @@ public class OpenAdModel extends BaseModel {
|
||||
private String endTime;//活动结束时间
|
||||
@SerializedName("popup_permission")
|
||||
private int permission;
|
||||
@SerializedName("popup_frequency")
|
||||
private int showModel = SHOW_DEF;//显示模式,1:杀死程序后弹出 2:指定时间内(本机时间) 3:1. 仅弹出一次
|
||||
@SerializedName("popup_frequency_time")
|
||||
private String section = "0";// SHOW_DEF = 2
|
||||
|
||||
|
||||
public OpenAdModel() {
|
||||
}
|
||||
|
||||
public static OpenAdModel createTestData() {
|
||||
OpenAdModel model = new OpenAdModel();
|
||||
model.id=3;
|
||||
model.type=1;
|
||||
model.url = "/h5/GuildTournament/20230821/rank.html";
|
||||
model.imageUrl = "https://ceshi.yaoulive.com/data/upload/20230913/1694589490.png";
|
||||
model.showTime = 10;
|
||||
model.delayShowTime = 0;
|
||||
model.model = MODEL_SQUARE;
|
||||
model.startTime = "2019-01-01 00:00:00";
|
||||
model.endTime = "2029-01-01 00:00:00";
|
||||
model.permission = 4;
|
||||
model.showModel = SHOW_DIY;
|
||||
model.section = "5";
|
||||
return model;
|
||||
}
|
||||
|
||||
public int getShowModel() {
|
||||
return showModel;
|
||||
}
|
||||
|
||||
public void setShowModel(int showModel) {
|
||||
this.showModel = showModel;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class QuickGiftSendGiftModel extends BaseModel {
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
@SerializedName("if_hidden_egg")
|
||||
private int ifHiddenEgg = 1;//1.未解锁 2.已解锁过奖励 3.当前请求解锁了奖励
|
||||
|
||||
public int getIfHiddenEgg() {
|
||||
return ifHiddenEgg;
|
||||
}
|
||||
|
||||
public QuickGiftSendGiftModel setIfHiddenEgg(int ifHiddenEgg) {
|
||||
this.ifHiddenEgg = ifHiddenEgg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
}
|
||||
|
||||
public QuickGiftSendGiftModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
|
||||
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIfViewingDurationComplete() {
|
||||
return ifViewingDurationComplete;
|
||||
}
|
||||
|
||||
public QuickGiftSendGiftModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
|
||||
this.ifViewingDurationComplete = ifViewingDurationComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SudGameDateModel extends BaseModel{
|
||||
|
||||
@SerializedName("room_holder_id")
|
||||
private String roomHolderId;
|
||||
@SerializedName("sex")
|
||||
private String sex;
|
||||
@SerializedName("golden_bean_number")
|
||||
private String goldenBeanNumber;
|
||||
|
||||
@SerializedName("room_holder_type")
|
||||
private String roomHolderType;
|
||||
@SerializedName("sud_game_id")
|
||||
private String sudGameId;
|
||||
@SerializedName("room_status")
|
||||
private String roomStatus;
|
||||
@SerializedName("sud_game_name")
|
||||
private String sudGameName;
|
||||
@SerializedName("sud_game_name_en")
|
||||
private String sud_game_name_en;
|
||||
@SerializedName("room_name")
|
||||
private String roomName;
|
||||
@SerializedName("player_total")
|
||||
private String playerTotal;
|
||||
@SerializedName("sud_game_icon")
|
||||
private String sudGameIcon;
|
||||
@SerializedName("room_holder_name")
|
||||
private String roomHolderName;
|
||||
@SerializedName("sud_game_room_id")
|
||||
private String sudGameRoomId;
|
||||
@SerializedName("ob_total")
|
||||
private String obTotal;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
|
||||
public String getRoomHolderId() {
|
||||
return roomHolderId;
|
||||
}
|
||||
|
||||
public String getSud_game_name_en() {
|
||||
return sud_game_name_en;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSud_game_name_en(String sud_game_name_en) {
|
||||
this.sud_game_name_en = sud_game_name_en;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SudGameDateModel setRoomHolderId(String roomHolderId) {
|
||||
this.roomHolderId = roomHolderId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSex(String sex) {
|
||||
this.sex = sex;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoldenBeanNumber() {
|
||||
return goldenBeanNumber;
|
||||
}
|
||||
|
||||
public SudGameDateModel setGoldenBeanNumber(String goldenBeanNumber) {
|
||||
this.goldenBeanNumber = goldenBeanNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getRoomHolderType() {
|
||||
return roomHolderType;
|
||||
}
|
||||
|
||||
public SudGameDateModel setRoomHolderType(String roomHolderType) {
|
||||
this.roomHolderType = roomHolderType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudGameId() {
|
||||
return sudGameId;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSudGameId(String sudGameId) {
|
||||
this.sudGameId = sudGameId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRoomStatus() {
|
||||
return roomStatus;
|
||||
}
|
||||
|
||||
public SudGameDateModel setRoomStatus(String roomStatus) {
|
||||
this.roomStatus = roomStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudGameName() {
|
||||
return sudGameName;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSudGameName(String sudGameName) {
|
||||
this.sudGameName = sudGameName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRoomName() {
|
||||
return roomName;
|
||||
}
|
||||
|
||||
public SudGameDateModel setRoomName(String roomName) {
|
||||
this.roomName = roomName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPlayerTotal() {
|
||||
return playerTotal;
|
||||
}
|
||||
|
||||
public SudGameDateModel setPlayerTotal(String playerTotal) {
|
||||
this.playerTotal = playerTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudGameIcon() {
|
||||
return sudGameIcon;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSudGameIcon(String sudGameIcon) {
|
||||
this.sudGameIcon = sudGameIcon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRoomHolderName() {
|
||||
return roomHolderName;
|
||||
}
|
||||
|
||||
public SudGameDateModel setRoomHolderName(String roomHolderName) {
|
||||
this.roomHolderName = roomHolderName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudGameRoomId() {
|
||||
return sudGameRoomId;
|
||||
}
|
||||
|
||||
public SudGameDateModel setSudGameRoomId(String sudGameRoomId) {
|
||||
this.sudGameRoomId = sudGameRoomId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getObTotal() {
|
||||
return obTotal;
|
||||
}
|
||||
|
||||
public SudGameDateModel setObTotal(String obTotal) {
|
||||
this.obTotal = obTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public SudGameDateModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public SudGameDateModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,17 @@ public class SudRoomListModel extends BaseModel {
|
||||
private String sex;
|
||||
@SerializedName("sud_game_icon")
|
||||
private String sudgameicon;
|
||||
@SerializedName("currency_type")
|
||||
private String currencyType;
|
||||
|
||||
public String getCurrencyType() {
|
||||
return currencyType;
|
||||
}
|
||||
|
||||
public SudRoomListModel setCurrencyType(String currencyType) {
|
||||
this.currencyType = currencyType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudgameicon() {
|
||||
return sudgameicon;
|
||||
@@ -200,9 +211,9 @@ public class SudRoomListModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getTotal() {
|
||||
if (TextUtils.isEmpty(obTotal)&&TextUtils.isEmpty(playerTotal)){
|
||||
if (TextUtils.isEmpty(obTotal) && TextUtils.isEmpty(playerTotal)) {
|
||||
return "0";
|
||||
}else {
|
||||
} else {
|
||||
int obT = Integer.parseInt(obTotal);
|
||||
int playerO = Integer.parseInt(playerTotal);
|
||||
return String.valueOf(obT + playerO);
|
||||
|
||||
@@ -71,6 +71,38 @@ public class UserBean implements Parcelable {
|
||||
//粉丝团等级
|
||||
private int fansLevel;
|
||||
//粉丝团进场皮肤
|
||||
protected int typeMic;
|
||||
private boolean isMicList = false;
|
||||
|
||||
private boolean isRequest = false;
|
||||
|
||||
public boolean isRequest() {
|
||||
return isRequest;
|
||||
}
|
||||
|
||||
public UserBean setRequest(boolean request) {
|
||||
isRequest = request;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isMicList() {
|
||||
return isMicList;
|
||||
}
|
||||
|
||||
public UserBean setMicList(boolean micList) {
|
||||
isMicList = micList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getTypeMic() {
|
||||
return typeMic;
|
||||
}
|
||||
|
||||
public UserBean setTypeMic(int typeMic) {
|
||||
this.typeMic = typeMic;
|
||||
return this;
|
||||
}
|
||||
|
||||
private String fansEnterRoomUrl;
|
||||
|
||||
public int getUserInfoComplete() {
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class CinemaTicketPopupWindow extends CenterPopupView {
|
||||
private CoolConfig mCoolConfig;
|
||||
private TextView cinemaTicket, ticketsPlusMinus, quantityNeed;
|
||||
private int ticket = 1;
|
||||
private CinemaTicketPopupWindowCallBack mCinemaTicketPopupWindowCallBack;
|
||||
|
||||
public CinemaTicketPopupWindow(@NonNull Context context, CoolConfig coolConfig, CinemaTicketPopupWindowCallBack cinemaTicketPopupWindowCallBack) {
|
||||
super(context);
|
||||
mCoolConfig = coolConfig;
|
||||
mCinemaTicketPopupWindowCallBack = cinemaTicketPopupWindowCallBack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.cinema_ticket_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
cinemaTicket = findViewById(R.id.cinema_ticket);
|
||||
ticketsPlusMinus = findViewById(R.id.tickets_plus_minus);
|
||||
quantityNeed = findViewById(R.id.quantity_need);
|
||||
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
|
||||
ticketsPlusMinus.setText(String.valueOf(ticket));
|
||||
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (ticket > 1) {
|
||||
ticket = ticket - 1;
|
||||
|
||||
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
|
||||
ticketsPlusMinus.setText(String.valueOf(ticket));
|
||||
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
findViewById(R.id.add).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ticket = ticket + 1;
|
||||
cinemaTicket.setText(new BigDecimal(ticket).add(new BigDecimal(mCoolConfig.getTicketCount())).toString());
|
||||
ticketsPlusMinus.setText(String.valueOf(ticket));
|
||||
quantityNeed.setText(new BigDecimal(ticket).multiply(new BigDecimal(mCoolConfig.getRate())).toString());
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.cinema_ticket_exchange), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(getContext())
|
||||
.buyTicket(String.valueOf(ticket), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
|
||||
if (mCinemaTicketPopupWindowCallBack != null) {
|
||||
mCinemaTicketPopupWindowCallBack.onCallBack(data);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface CinemaTicketPopupWindowCallBack {
|
||||
void onCallBack(String data);
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,16 @@ package com.yunbao.common.dialog;
|
||||
|
||||
import static androidx.core.content.ContextCompat.getSystemService;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -20,14 +24,17 @@ 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;
|
||||
import com.yunbao.common.event.CreateSudGameEvent;
|
||||
import com.yunbao.common.event.CurrencyTypeEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||
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.ToastUtil;
|
||||
import com.yunbao.common.views.LiveSudGamePopup;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -36,15 +43,21 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
public class CreateSudGamePopup extends BottomPopupView {
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
private TextView createGameType;
|
||||
private TextView createGameType, selectCurrencyType;
|
||||
private EditText roomName, gameSill;
|
||||
private long interactionID = 0;
|
||||
private String id;
|
||||
private boolean isHomeView;
|
||||
private boolean isHome = false;
|
||||
private List<String> roomNames = new ArrayList<>();
|
||||
|
||||
private String currencyType = "3", currencyTypeName;
|
||||
private long animDuration = 500;
|
||||
private ImageView roomGameArrow;
|
||||
|
||||
public CreateSudGamePopup(@NonNull Context context, List<CustomSidebarChildModel> child, boolean isHome) {
|
||||
super(context);
|
||||
@@ -71,19 +84,42 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
Bus.getOn(this);
|
||||
initView();
|
||||
initDate();
|
||||
initView();
|
||||
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
private String userName;
|
||||
private boolean isYuanbao;
|
||||
|
||||
private void initDate() {
|
||||
currencyTypeName = getContext().getString(R.string.golden_bean);
|
||||
userName = IMLoginManager.get(getContext()).getUserInfo().getUserNicename();
|
||||
roomNames.add(WordUtil.isNewZh() ? "壹起玩吧!" : "Let's play together!");
|
||||
roomNames.add(WordUtil.isNewZh() ? "來戰鬥吧!" : "Let's fight!");
|
||||
roomNames.add(WordUtil.isNewZh() ? "決戰到天亮 " : "Fight until dawn");
|
||||
roomNames.add(WordUtil.isNewZh() ? "在線等遊戲夥伴~" : "Waiting for game partners~");
|
||||
roomNames.add(WordUtil.isNewZh() ? userName + "的房间 " : userName + "‘s room");
|
||||
LiveNetManager.get(getContext()).checkCurrency(new HttpCallback<CheckCurrencyModel>() {
|
||||
@Override
|
||||
public void onSuccess(CheckCurrencyModel data) {
|
||||
isYuanbao = TextUtils.equals(data.getIsYuanbao(), "1") || TextUtils.equals(data.getIsYuanbao(), "true");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
createGameType = findViewById(R.id.create_game_type);
|
||||
selectCurrencyType = findViewById(R.id.select_currency_type);
|
||||
roomName = findViewById(R.id.room_name);
|
||||
gameSill = findViewById(R.id.game_sill);
|
||||
roomGameArrow = findViewById(R.id.room_game_arrow);
|
||||
gameSill.setHint(WordUtil.isNewZh() ? "請輸入貨幣數量" : "Please enter the amount of currency");
|
||||
ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
@@ -128,18 +164,19 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.create_room), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
String sill = gameSill.getText().toString();
|
||||
String name = roomName.getText().toString();
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
if (name.length() > 10) {
|
||||
ToastUtil.show("房間名长度为[1-10]");
|
||||
if (name.length() > 15) {
|
||||
ToastUtil.show("房間名长度为[1-15]");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() != Locale.SIMPLIFIED_CHINESE) {
|
||||
if (name.length() > 15) {
|
||||
ToastUtil.show("Room name length is [1-15]");
|
||||
if (name.length() > 30) {
|
||||
ToastUtil.show("Room name length is [1-30]");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -160,43 +197,84 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(sill)) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("数量区间为100--5W");
|
||||
if (TextUtils.equals(currencyType, "3")) {
|
||||
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量區間為[100-5W]");
|
||||
} else {
|
||||
ToastUtil.show("The amount of money ranges from [100-5W]");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show("The quantity range is 100 to 5 W");
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量区间为[10 - 1000]");
|
||||
} else {
|
||||
ToastUtil.show("Currency quantity range [10-1000]");
|
||||
} }
|
||||
|
||||
return;
|
||||
}
|
||||
if (sill.length() > 6 ){
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("数量区间为100--5W");
|
||||
if (TextUtils.equals(currencyType, "3")) {
|
||||
if (sill.length() > 6) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量區間為[100-5W]");
|
||||
} else {
|
||||
ToastUtil.show("The amount of money ranges from [100-5W]");
|
||||
}
|
||||
return;
|
||||
|
||||
} else {
|
||||
ToastUtil.show("The quantity range is 100 to 5 W");
|
||||
int sillNumber = Integer.parseInt(sill);
|
||||
if (sillNumber < 100 || sillNumber > 50000) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量區間為[100-5W]");
|
||||
} else {
|
||||
ToastUtil.show("The amount of money ranges from [100-5W]");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (sillNumber % 10 != 0) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量必須為10的倍數");
|
||||
} else {
|
||||
ToastUtil.show("The number of currency must be a multiple of 10");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}else {
|
||||
int sillNumber = Integer.parseInt(sill);
|
||||
if (sillNumber < 100 || sillNumber > 50000) {
|
||||
} else {
|
||||
if (sill.length() > 4) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("数量区间为100--5W");
|
||||
ToastUtil.show("貨幣數量区间为[10 - 1000]");
|
||||
} else {
|
||||
ToastUtil.show("The quantity range is 100 to 5 W");
|
||||
ToastUtil.show("Currency quantity range [10-1000]");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (sillNumber%10!=0){
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("金豆數量必須為10的倍數");
|
||||
} else {
|
||||
ToastUtil.show("The number of golden beans must be a multiple of 10");
|
||||
} else {
|
||||
int sillNumber = Integer.parseInt(sill);
|
||||
if (sillNumber < 10 || sillNumber > 1000) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量区间为[10 - 1000]");
|
||||
} else {
|
||||
ToastUtil.show("Currency quantity range [10-1000]]");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (sillNumber % 10 != 0) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣數量必須為10的倍數");
|
||||
} else {
|
||||
ToastUtil.show("The number of currency must be a multiple of 10");
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LiveNetManager.get(getContext())
|
||||
.createSudRoom(name, sill, id, new HttpCallback<CreateSudRoomModel>() {
|
||||
.createSudRoom(name, sill, currencyType, id, new HttpCallback<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onSuccess(CreateSudRoomModel data) {
|
||||
if (isHome) {
|
||||
@@ -205,12 +283,8 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
intent.putExtra("CreateSudRoom", new Gson().toJson(data));
|
||||
getContext().startActivity(intent);
|
||||
} else {
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.dismissOnBackPressed(false)
|
||||
.asCustom(new LiveSudGamePopup(getContext(), data))
|
||||
.show();
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
|
||||
|
||||
dialog.dismiss();
|
||||
Bus.get().post(new SudGameListDissMissEvent());
|
||||
}
|
||||
@@ -224,6 +298,45 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
});
|
||||
}
|
||||
});
|
||||
roomName.setText(WordUtil.isNewZh() ? userName + "的房间 " : userName + "‘s room");
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.create_game_random), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Random random = new Random();
|
||||
int randomNumber = random.nextInt(roomNames.size());
|
||||
roomName.setText(roomNames.get(randomNumber));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.currency_type), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 0f, 90f);
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent();
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void closeAnimSudGameListEvent() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 90f, 0f);
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -239,4 +352,16 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
id = event.getId();
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCurrencyTypeEvent(CurrencyTypeEvent event) {
|
||||
currencyTypeName = event.getCurrencyTypeName();
|
||||
currencyType = event.getCurrencyType();
|
||||
selectCurrencyType.setText(currencyTypeName);
|
||||
if (TextUtils.equals(currencyType, "3")) {
|
||||
gameSill.setHint(WordUtil.isNewZh() ? "請輸入貨幣數量" : "Please enter the amount of currency");
|
||||
} else {
|
||||
gameSill.setHint(WordUtil.isNewZh() ? "請輸入貨幣數量" : "Please enter the amount of currency");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.bean.SudRoomListModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.RoomHolderTypeEvent;
|
||||
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||
import com.yunbao.common.event.SudGameListEvent;
|
||||
@@ -33,7 +34,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.LiveSudGamePopup;
|
||||
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -51,7 +52,7 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
private TextView gameTitle, sillTitle, houseOwnerTitle;
|
||||
private String id = "0", mLiveUid;
|
||||
private int page = 0;
|
||||
private String mSill = "0,0", mSillName, roomHolderType = "0", roomHolderTypeName;
|
||||
private String mSill = "0,0,0", mSillName, roomHolderType = "0", roomHolderTypeName;
|
||||
private CommonRefreshView mRefreshView;
|
||||
private SudGameListAdapter sudGameListAdapter;
|
||||
|
||||
@@ -99,7 +100,7 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
|
||||
for (CustomSidebarChildModel model : customSidebarChildModels) {
|
||||
if (TextUtils.equals(String.valueOf(interactionID), model.getSrc())) {
|
||||
gameTitle.setText(model.getTitle().substring(0, 2));
|
||||
gameTitle.setText(model.getTitle());
|
||||
id = model.getId();
|
||||
}
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
page = p;
|
||||
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, p - 1, callback);
|
||||
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, "3", p - 1, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -157,18 +158,14 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(getContext())
|
||||
.randomRoom(id, mSill, roomHolderType,new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
.randomRoom(id, mSill, roomHolderType, new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||
@Override
|
||||
public void onSuccess(CreateSudRoomModel data) {
|
||||
if (data != null) {
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.dismissOnBackPressed(false)
|
||||
.asCustom(new LiveSudGamePopup(getContext(), data))
|
||||
.show();
|
||||
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
|
||||
dialog.dismiss();
|
||||
}else {
|
||||
} else {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("当前没有可加入的房间");
|
||||
} else {
|
||||
@@ -257,9 +254,27 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
.asCustom(new CreateSudGamePopup(getContext(), customSidebarChildModels, false))
|
||||
|
||||
.show();
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_rule_bottom), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.asCustom(new SudGameRuleBottom(getContext())).show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,13 +294,13 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
public void onSudGameListEvent(SudGameListEvent event) {
|
||||
interactionID = event.getInteractionID();
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
gameTitle.setText(event.getTitle().substring(0, 2));
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
if (event.getTitle().contains("All")) {
|
||||
gameTitle.setText("All");
|
||||
} else {
|
||||
if ((event.getTitle().length() > 6)) {
|
||||
gameTitle.setText(event.getTitle().substring(0, 5));
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
gameTitle.setText(event.getTitle());
|
||||
}
|
||||
@@ -305,7 +320,7 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
public void onSudGameListSillEvent(SudGameListSillEvent event) {
|
||||
mSill = event.getSill();
|
||||
mSillName = event.getSillName();
|
||||
if (TextUtils.equals("0,0", mSill)) {
|
||||
if (TextUtils.equals("0,0,0", mSill)) {
|
||||
sillTitle.setText(mSillName);
|
||||
} else {
|
||||
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.yunbao.common.dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -15,6 +14,8 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.SudTitleSelectAdapter;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.event.CreateSudGameEvent;
|
||||
import com.yunbao.common.event.CurrencyTypeEvent;
|
||||
import com.yunbao.common.event.LiveSudGameHistoryEvent;
|
||||
import com.yunbao.common.event.RoomHolderTypeEvent;
|
||||
import com.yunbao.common.event.SudGameListEvent;
|
||||
import com.yunbao.common.event.SudGameListSillEvent;
|
||||
@@ -39,6 +40,7 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
||||
private long interactionID = 0;
|
||||
private DialogInterface.OnDismissListener onDismissListener;
|
||||
private String mSill;
|
||||
private boolean isYuanbao;
|
||||
|
||||
public SudGameListSelectPopup(@NonNull Context context, int type, List<CustomSidebarChildModel> child, long interactionID) {
|
||||
super(context);
|
||||
@@ -58,6 +60,20 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
||||
mSill = sill;
|
||||
}
|
||||
|
||||
public SudGameListSelectPopup(@NonNull Context context, int mType, String sill, boolean isYuanbao) {
|
||||
super(context);
|
||||
this.mType = mType;
|
||||
mSill = sill;
|
||||
this.isYuanbao = isYuanbao;
|
||||
}
|
||||
|
||||
public SudGameListSelectPopup(@NonNull Context context, String sill, List<CustomSidebarChildModel> child) {
|
||||
super(context);
|
||||
this.mType = 8;
|
||||
mSill = sill;
|
||||
customSidebarChildModels = child;
|
||||
}
|
||||
|
||||
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_sud_game_slelect;
|
||||
@@ -108,13 +124,17 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_0_1));
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_1_2));
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_2_5));
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_5));
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0,0");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_0_1), "0,1");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_1_2), "1,2");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_2_5), "2,5");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_5), "5,0");
|
||||
selectString.add(getContext().getString(R.string.room_sill0_100));
|
||||
selectString.add(getContext().getString(R.string.room_sill100_500));
|
||||
selectString.add(getContext().getString(R.string.room_sill500_m));
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0,0,0");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_0_1), "0,1,3");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_1_2), "1,5,3");
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_5), "5,0,3");
|
||||
selectSill.put(getContext().getString(R.string.room_sill0_100), "0,1,2");
|
||||
selectSill.put(getContext().getString(R.string.room_sill100_500), "1,5,2");
|
||||
selectSill.put(getContext().getString(R.string.room_sill500_m), "5,0,2");
|
||||
index = 0;
|
||||
for (int i = 0; i < selectString.size(); i++) {
|
||||
if (TextUtils.equals(mSill, selectString.get(i))) {
|
||||
@@ -160,6 +180,127 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
} else if (mType == 5) {
|
||||
selectString.add(getContext().getString(R.string.golden_bean));
|
||||
if (isYuanbao) {
|
||||
selectString.add(getContext().getString(R.string.coins));
|
||||
}
|
||||
selectSill.put(getContext().getString(R.string.golden_bean), "3");
|
||||
if (isYuanbao) {
|
||||
selectSill.put(getContext().getString(R.string.coins), "2");
|
||||
}
|
||||
|
||||
index = 0;
|
||||
for (int i = 0; i < selectString.size(); i++) {
|
||||
if (TextUtils.equals(mSill, selectString.get(i))) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
sudTitleSelectAdapter = new SudTitleSelectAdapter(selectString, index, mType);
|
||||
sudTitleSelect.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
sudTitleSelect.setAdapter(sudTitleSelectAdapter);
|
||||
topSelect.setVisibility(GONE);
|
||||
sudTitleSelectAdapter.setSudTitleSelectCallBack(new SudTitleSelectAdapter.SudTitleSelectCallBack() {
|
||||
@Override
|
||||
public void onSudTitleSelectCallBack(int index) {
|
||||
String roomHolderTypeName = selectString.get(index);
|
||||
String roomHolderType = selectSill.get(roomHolderTypeName);
|
||||
Bus.get().post(new CurrencyTypeEvent().setCurrencyType(roomHolderType).setCurrencyTypeName(roomHolderTypeName));
|
||||
dialog.dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (mType == 6) {
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
||||
selectString.add(getContext().getString(R.string.golden_bean));
|
||||
selectString.add(getContext().getString(R.string.coins));
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0");
|
||||
selectSill.put(getContext().getString(R.string.golden_bean), "3");
|
||||
selectSill.put(getContext().getString(R.string.coins), "2");
|
||||
index = 0;
|
||||
for (int i = 0; i < selectString.size(); i++) {
|
||||
if (TextUtils.equals(mSill, selectString.get(i))) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
sudTitleSelectAdapter = new SudTitleSelectAdapter(selectString, index, mType);
|
||||
sudTitleSelect.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
sudTitleSelect.setAdapter(sudTitleSelectAdapter);
|
||||
topSelect.setVisibility(GONE);
|
||||
sudTitleSelectAdapter.setSudTitleSelectCallBack(new SudTitleSelectAdapter.SudTitleSelectCallBack() {
|
||||
@Override
|
||||
public void onSudTitleSelectCallBack(int index) {
|
||||
String roomHolderTypeName = selectString.get(index);
|
||||
String roomHolderType = selectSill.get(roomHolderTypeName);
|
||||
Bus.get().post(new LiveSudGameHistoryEvent().setType(roomHolderType).setTypeName(roomHolderTypeName).setIndex(3));
|
||||
dialog.dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (mType == 7) {
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
||||
selectString.add(getContext().getString(R.string.sud_in_game_game_game_peer_today));
|
||||
selectString.add(getContext().getString(R.string.sud_in_game_game_game_peer_today_7));
|
||||
selectString.add(getContext().getString(R.string.sud_in_game_game_game_peer_today_30));
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0");
|
||||
selectSill.put(getContext().getString(R.string.sud_in_game_game_game_peer_today), "1");
|
||||
selectSill.put(getContext().getString(R.string.sud_in_game_game_game_peer_today_7), "2");
|
||||
selectSill.put(getContext().getString(R.string.sud_in_game_game_game_peer_today_30), "3");
|
||||
index = 0;
|
||||
for (int i = 0; i < selectString.size(); i++) {
|
||||
if (TextUtils.equals(mSill, selectString.get(i))) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
sudTitleSelectAdapter = new SudTitleSelectAdapter(selectString, index, mType);
|
||||
sudTitleSelect.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
sudTitleSelect.setAdapter(sudTitleSelectAdapter);
|
||||
topSelect.setVisibility(GONE);
|
||||
sudTitleSelectAdapter.setSudTitleSelectCallBack(new SudTitleSelectAdapter.SudTitleSelectCallBack() {
|
||||
@Override
|
||||
public void onSudTitleSelectCallBack(int index) {
|
||||
String roomHolderTypeName = selectString.get(index);
|
||||
String roomHolderType = selectSill.get(roomHolderTypeName);
|
||||
Bus.get().post(new LiveSudGameHistoryEvent().setType(roomHolderType).setTypeName(roomHolderTypeName).setIndex(2));
|
||||
dialog.dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (mType == 8) {
|
||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0");
|
||||
for (int i = 0; i < customSidebarChildModels.size(); i++) {
|
||||
selectString.add(customSidebarChildModels.get(i).getTitle());
|
||||
selectSill.put(customSidebarChildModels.get(i).getTitle(), customSidebarChildModels.get(i).getId());
|
||||
}
|
||||
index = 0;
|
||||
for (int i = 0; i < selectString.size(); i++) {
|
||||
if (TextUtils.equals(mSill, selectString.get(i))) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
sudTitleSelectAdapter = new SudTitleSelectAdapter(selectString, index, mType);
|
||||
sudTitleSelect.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
sudTitleSelect.setAdapter(sudTitleSelectAdapter);
|
||||
topSelect.setVisibility(GONE);
|
||||
sudTitleSelectAdapter.setSudTitleSelectCallBack(new SudTitleSelectAdapter.SudTitleSelectCallBack() {
|
||||
@Override
|
||||
public void onSudTitleSelectCallBack(int index) {
|
||||
String roomHolderTypeName = selectString.get(index);
|
||||
String roomHolderType = selectSill.get(roomHolderTypeName);
|
||||
Bus.get().post(new LiveSudGameHistoryEvent().setType(roomHolderType).setTypeName(roomHolderTypeName).setIndex(1));
|
||||
dialog.dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(topSelect, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
@@ -173,7 +314,7 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
if(onDismissListener!=null){
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class SudGameRuleBottom extends BottomPopupView {
|
||||
public SudGameRuleBottom(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.sud_game_rule_bottom_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_rule_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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 SudGameRulePopup extends CenterPopupView {
|
||||
public SudGameRulePopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.sud_game_rule_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_rule_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -22,13 +22,15 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.SudHomeGameListAdapter;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.SudRoomListModel;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||
import com.yunbao.common.event.SudRoomListModelEvent;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.views.FlowLayout;
|
||||
import com.yunbao.common.views.LiveSudGamePopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -52,6 +54,12 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
this.isHome = isHome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
Bus.getOff(this);
|
||||
super.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.moveUpToKeyboard(false);
|
||||
@@ -70,6 +78,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
Bus.getOn(this);
|
||||
editSearch = findViewById(R.id.edit_search);
|
||||
// listHistory = findViewById(R.id.list_history);
|
||||
listRoom = findViewById(R.id.list_room);
|
||||
@@ -163,7 +172,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
private void search(String value) {
|
||||
|
||||
LiveNetManager.get(mContext)
|
||||
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
|
||||
.searchRoomList("0", "0,0,0", "0", value, "0", 0, new HttpCallback<List<SudRoomListModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SudRoomListModel> data) {
|
||||
if (data.size() > 0) {
|
||||
@@ -194,7 +203,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
|
||||
listRoom.setVisibility(GONE);
|
||||
history.setVisibility(GONE);
|
||||
@@ -226,6 +235,11 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListEvent(SudRoomListModelEvent event) {
|
||||
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||
@@ -234,12 +248,8 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
createSudRoomModel.setAvatar(event.getModel().getAvatar());
|
||||
createSudRoomModel.setRoomName(event.getModel().getRoomName());
|
||||
createSudRoomModel.setSudGameName(event.getModel().getSudGameName());
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.dismissOnBackPressed(false)
|
||||
.asCustom(new LiveSudGamePopup(getContext(), createSudRoomModel))
|
||||
.show();
|
||||
dialog.dismiss();
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CheckCurrencyModel extends BaseModel {
|
||||
|
||||
@SerializedName("is_yuanbao")
|
||||
private String isYuanbao;
|
||||
|
||||
public String getIsYuanbao() {
|
||||
return isYuanbao;
|
||||
}
|
||||
|
||||
public CheckCurrencyModel setIsYuanbao(String isYuanbao) {
|
||||
this.isYuanbao = isYuanbao;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CheckRemainingBalanceEvent extends BaseModel {
|
||||
public int seatIndex;
|
||||
public List<SudMGPMGState.MGCommonGameSettle.PlayerResult> results = new ArrayList<>();
|
||||
public int seatIndex=0;
|
||||
private String SudMGPMGState;
|
||||
|
||||
public List<SudMGPMGState.MGCommonGameSettle.PlayerResult> getResults() {
|
||||
return results;
|
||||
public String getSudMGPMGState() {
|
||||
return SudMGPMGState;
|
||||
}
|
||||
|
||||
public CheckRemainingBalanceEvent setResults(List<SudMGPMGState.MGCommonGameSettle.PlayerResult> results) {
|
||||
this.results = results;
|
||||
public CheckRemainingBalanceEvent setSudMGPMGState(String sudMGPMGState) {
|
||||
SudMGPMGState = sudMGPMGState;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CurrencyTypeEvent extends BaseModel {
|
||||
private String currencyType;
|
||||
private String currencyTypeName;
|
||||
|
||||
public String getCurrencyType() {
|
||||
return currencyType;
|
||||
}
|
||||
|
||||
public CurrencyTypeEvent setCurrencyType(String currencyType) {
|
||||
this.currencyType = currencyType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCurrencyTypeName() {
|
||||
return currencyTypeName;
|
||||
}
|
||||
|
||||
public CurrencyTypeEvent setCurrencyTypeName(String currencyTypeName) {
|
||||
this.currencyTypeName = currencyTypeName;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class HideShowEvent extends BaseModel {
|
||||
private boolean isClose = false;
|
||||
private boolean hide = false;
|
||||
|
||||
public boolean isHide() {
|
||||
return hide;
|
||||
}
|
||||
|
||||
public HideShowEvent setHide(boolean hide) {
|
||||
this.hide = hide;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isClose() {
|
||||
return isClose;
|
||||
}
|
||||
|
||||
public HideShowEvent setClose(boolean close) {
|
||||
isClose = close;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.VideoBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -23,6 +24,16 @@ public class JavascriptInterfaceEvent extends BaseModel {
|
||||
private String data;
|
||||
private String name;
|
||||
private String image;
|
||||
private CoolConfig coolConfig;
|
||||
|
||||
public CoolConfig getCoolConfig() {
|
||||
return coolConfig;
|
||||
}
|
||||
|
||||
public JavascriptInterfaceEvent setCoolConfig(CoolConfig coolConfig) {
|
||||
this.coolConfig = coolConfig;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LiveSudGameHistoryEvent extends BaseModel {
|
||||
private String type;
|
||||
private String typeName;
|
||||
private int index;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public LiveSudGameHistoryEvent setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public LiveSudGameHistoryEvent setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public LiveSudGameHistoryEvent setIndex(int index) {
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
|
||||
public class LiveSudGamePopupShowOrHideEvent {
|
||||
private int type = 0;//0展示,1hide隱藏,2dismiss關閉
|
||||
private CreateSudRoomModel createSudRoomModel;
|
||||
|
||||
public CreateSudRoomModel getCreateSudRoomModel() {
|
||||
return createSudRoomModel;
|
||||
}
|
||||
|
||||
public LiveSudGamePopupShowOrHideEvent setCreateSudRoomModel(CreateSudRoomModel createSudRoomModel) {
|
||||
this.createSudRoomModel = createSudRoomModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public LiveSudGamePopupShowOrHideEvent setType(int type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class QuickGiftingEvent extends BaseModel {
|
||||
private int index;
|
||||
private String svgaName;
|
||||
private boolean show =false;
|
||||
private boolean reminder = false;
|
||||
|
||||
private String giftRemainingQuantity;
|
||||
private String hotNum;
|
||||
|
||||
public String getHotNum() {
|
||||
return hotNum;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setHotNum(String hotNum) {
|
||||
this.hotNum = hotNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftRemainingQuantity() {
|
||||
return giftRemainingQuantity;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setGiftRemainingQuantity(String giftRemainingQuantity) {
|
||||
this.giftRemainingQuantity = giftRemainingQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isReminder() {
|
||||
return reminder;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setReminder(boolean reminder) {
|
||||
this.reminder = reminder;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setShow(boolean show) {
|
||||
this.show = show;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setIndex(int index) {
|
||||
this.index = index;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSvgaName() {
|
||||
return svgaName;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setSvgaName(String svgaName) {
|
||||
this.svgaName = svgaName;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class ShowHideEvent extends BaseModel {
|
||||
|
||||
}
|
||||
15
common/src/main/java/com/yunbao/common/event/SlideEvent.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class SlideEvent extends BaseModel {
|
||||
private boolean isSlide;
|
||||
|
||||
public boolean isSlide() {
|
||||
return isSlide;
|
||||
}
|
||||
public SlideEvent setSlide(boolean slide) {
|
||||
isSlide = slide;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ public class CommonHttpUtil {
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
ToastUtil.show(CommonAppContext.getTopActivity().getString(R.string.net_error) + "code:" + code + " msg:" + msg);
|
||||
ToastUtil.show(context.getString(R.string.net_error) + "code:" + code + " msg:" + msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -970,13 +970,34 @@ public class LiveHttpUtil {
|
||||
|
||||
}
|
||||
|
||||
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid,int page,HttpCallback callback ) {
|
||||
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType, int page, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Sudgameserver.getRoomList", "Sudgameserver.getRoomList")
|
||||
.params("sud_game_id",sudGameId)
|
||||
.params("threshold",threshold)
|
||||
.params("room_holder_type",roomHolderType)
|
||||
.params("liveuid",liveUid)
|
||||
.params("page",page)
|
||||
.params("sud_game_id", sudGameId)
|
||||
.params("threshold", threshold)
|
||||
.params("room_holder_type", roomHolderType)
|
||||
.params("liveuid", liveUid)
|
||||
.params("currency_type ", currencyType)
|
||||
.params("page", page)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戲記錄
|
||||
*
|
||||
* @param sudGameId sud_game_id 游戏ID
|
||||
* @param currencyType currency_type 游戏货币类型 3=>金豆 2=>星币 0=>星币
|
||||
* @param dateType date_type 时间 0=>不限 1=>今日 2=>7日内 3=>30日内
|
||||
* @param page
|
||||
* @param callback
|
||||
*/
|
||||
public static void gameRecord(String sudGameId, String currencyType, String dateType, int page, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Sudgameserver.gameRecord", "Sudgameserver.gameRecord")
|
||||
.params("sud_game_id", sudGameId)
|
||||
.params("currency_type", currencyType)
|
||||
.params("date_type", dateType)
|
||||
.params("page", page)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
import com.yunbao.common.bean.ContributeModel;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
@@ -46,6 +47,7 @@ import com.yunbao.common.bean.OpenAdModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
@@ -63,6 +65,7 @@ import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -163,18 +166,23 @@ public interface PDLiveApi {
|
||||
* @param num 请求数量
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Home.anchorRecommend ")
|
||||
@GET("/api/public/?service=Home.anchorRecommend")
|
||||
Observable<ResponseModel<AnchorRecommendModel>> anchorRecommend(
|
||||
@Query("num") String num
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Home.anchorRecommend")
|
||||
Observable<ResponseModel<AnchorRecommendModel>> anchorRecommend(
|
||||
@QueryMap Map<String, Object> map
|
||||
);
|
||||
|
||||
/**
|
||||
* 直播间上下滚动列表
|
||||
*
|
||||
* @param num 请求数量
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Home.anchorRecommend ")
|
||||
@GET("/api/public/?service=Home.anchorRecommend")
|
||||
Observable<ResponseModel<AnchorRecommendModel>> anchorRecommend(
|
||||
@Query("num") String num, @Query("type") String type
|
||||
);
|
||||
@@ -187,7 +195,7 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveInfo")
|
||||
Observable<ResponseModel<List<LiveInfoModel>>> getLiveInfo(
|
||||
@Query("liveuid") String liveuid
|
||||
@Query("liveuid") String liveui
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -991,6 +999,7 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<CreateSudRoomModel>> createSudRoom(
|
||||
@Query("room_name") String roomName,
|
||||
@Query("golden_bean_number") String goldenBeanNumber,
|
||||
@Query("currency_type") String currencyType,
|
||||
@Query("game_id") String gameId);
|
||||
|
||||
/**
|
||||
@@ -1004,6 +1013,7 @@ public interface PDLiveApi {
|
||||
@Query("threshold") String threshold,
|
||||
@Query("room_holder_type") String roomHolderType,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("currency_type") String currencyType,
|
||||
@Query("page") int page
|
||||
);
|
||||
|
||||
@@ -1017,6 +1027,7 @@ public interface PDLiveApi {
|
||||
@Query("room_holder_type") String roomHolderType,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("search") String search,
|
||||
@Query("currency_type") String currencyType,
|
||||
@Query("page") int page
|
||||
);
|
||||
|
||||
@@ -1043,5 +1054,41 @@ public interface PDLiveApi {
|
||||
@GET("/api/public/?service=Home.activityPopup")
|
||||
Observable<ResponseModel<List<OpenAdModel>>> activityPopup();
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.gameStartCheckRemainingBalance")
|
||||
Observable<ResponseModel<CheckRemainingBalance>> gameStartCheckRemainingBalance(
|
||||
@Query("mg_id") String mgId,
|
||||
@Query("room_id") String roomId
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.deductMoney")
|
||||
Observable<ResponseModel<Object>> deductMoney(
|
||||
@Query("room_id") String roomId
|
||||
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.checkCurrency")
|
||||
Observable<ResponseModel<CheckCurrencyModel>> checkCurrency(
|
||||
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Quickgift.sendGift")
|
||||
Observable<ResponseModel<QuickGiftSendGiftModel>> quickGiftSendGift(
|
||||
@Query("quick_gift_number") String quickGiftNumber,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Quickgift.viewingDurationGetGift")
|
||||
Observable<ResponseModel<QuickGiftSendGiftModel>> viewingDurationGetGift(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=cool.config")
|
||||
Observable<ResponseModel<CoolConfig>> getCoolConfig();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/api/public/?service=cool.buy_ticket")
|
||||
Observable<ResponseModel<Object>> buyTicket(
|
||||
@Field("quantity") String quantity
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
@@ -44,6 +45,7 @@ import com.yunbao.common.bean.OpenAdModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
@@ -59,10 +61,12 @@ import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.CheckLiveCallBack;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -2243,9 +2247,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void createSudRoom(String roomName, String goldenBeanNumber, String gameId, HttpCallback<CreateSudRoomModel> callback) {
|
||||
public void createSudRoom(String roomName, String goldenBeanNumber, String currencyType, String gameId, HttpCallback<CreateSudRoomModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.createSudRoom(roomName, goldenBeanNumber, gameId)
|
||||
.createSudRoom(roomName, goldenBeanNumber, currencyType, gameId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CreateSudRoomModel>>() {
|
||||
@@ -2314,9 +2318,173 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||
public void deductMoney(String roomId) {
|
||||
// API.get().pdLiveApi(mContext)
|
||||
// .deductMoney(roomId)
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
// @Override
|
||||
// public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
//
|
||||
// }
|
||||
// }, new Consumer<Throwable>() {
|
||||
// @Override
|
||||
// public void accept(Throwable throwable) throws Exception {
|
||||
//
|
||||
// }
|
||||
// }).isDisposed();
|
||||
}
|
||||
|
||||
public void checkCurrency(HttpCallback<CheckCurrencyModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRoomList(sudGameId, threshold, roomHolderType, liveUid, page)
|
||||
.checkCurrency()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CheckCurrencyModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<CheckCurrencyModel> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(objectResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void gameStartCheckRemainingBalance(String mgId, String roomId, HttpCallback<CheckRemainingBalance> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.gameStartCheckRemainingBalance(mgId, roomId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CheckRemainingBalance>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<CheckRemainingBalance> createSudRoomModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (createSudRoomModelResponseModel.getData().getInfo().getStatus() == 1) {
|
||||
callback.onSuccess(createSudRoomModelResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(createSudRoomModelResponseModel.getData().getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
|
||||
callback.onError(WordUtil.isNewZh() ? "金豆不够" : "Insufficient money ");
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void viewingDurationGetGift(String liveUid, HttpCallback<QuickGiftSendGiftModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.viewingDurationGetGift(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(quickGiftSendGiftModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getCoolConfig(HttpCallback<CoolConfig> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getCoolConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<CoolConfig>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<CoolConfig> coolConfigResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(coolConfigResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void buyTicket(String quantity, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.buyTicket(quantity)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (objectResponseModel.getData().getCode() == 200) {
|
||||
callback.onSuccess("1");
|
||||
} else if (objectResponseModel.getData().getCode() == 500) {
|
||||
callback.onSuccess("2");
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void quickGiftSendGift(String quickGiftNumber, String liveUid, String stream, HttpCallback<QuickGiftSendGiftModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.quickGiftSendGift(quickGiftNumber, liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(quickGiftSendGiftModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRoomList(sudGameId, threshold, roomHolderType, liveUid, currencyType, page)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
||||
@@ -2336,9 +2504,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, String currencyType, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search, page)
|
||||
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search, currencyType, page)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
||||
|
||||
@@ -14,7 +14,9 @@ import com.yunbao.common.http.ResponseData;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.functions.Consumer;
|
||||
@@ -115,6 +117,22 @@ public class MainNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void anchorRecommend(Map<String, Object> map, HttpCallback<AnchorRecommendModel> httpCallback) {
|
||||
API.get().pdLiveApi(mContext).anchorRecommend(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(anchorRecommendModelResponseModel -> {
|
||||
if (httpCallback != null) {
|
||||
AnchorRecommendModel model = anchorRecommendModelResponseModel.getData().getInfo();
|
||||
httpCallback.onSuccess(model);
|
||||
}
|
||||
}, throwable -> {
|
||||
if (httpCallback != null) {
|
||||
httpCallback.onError(throwable.getMessage());
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 猜你喜欢
|
||||
*
|
||||
@@ -122,7 +140,11 @@ public class MainNetManager {
|
||||
* @return
|
||||
*/
|
||||
public void anchorRecommendType(String num, HttpCallback<AnchorRecommendModel> httpCallback) {
|
||||
API.get().pdLiveApi(mContext).anchorRecommend(num, "1")
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("num", num);
|
||||
map.put("live_recommend", "slide");
|
||||
map.put("type", "1");
|
||||
API.get().pdLiveApi(mContext).anchorRecommend(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(anchorRecommendModelResponseModel -> {
|
||||
@@ -266,6 +288,7 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取直播间上下滑动红包集合
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,21 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
public boolean getRedPoint() {
|
||||
return !TextUtils.isEmpty(getString("RedPoint")) && !TextUtils.equals(getString("RedPoint"), "1");
|
||||
}
|
||||
public void setQuickGiftIfFirst() {
|
||||
put("quick_gift_if_first", "1");
|
||||
}
|
||||
|
||||
public boolean getQuickGiftIfFirst() {
|
||||
return TextUtils.isEmpty(getString("quick_gift_if_first")) || !TextUtils.equals(getString("quick_gift_if_first"), "1");
|
||||
}
|
||||
|
||||
public void setSudGameMin() {
|
||||
put("SudGameMin", "0");
|
||||
}
|
||||
|
||||
public boolean getSudGameMin() {
|
||||
return !TextUtils.isEmpty(getString("SudGameMin")) && !TextUtils.equals(getString("SudGameMin"), "1");
|
||||
}
|
||||
|
||||
public void setSudGame(String sudGameJson) {
|
||||
put(KEY_GAME, sudGameJson);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -36,7 +37,30 @@ public class LiveClassManager extends BaseCacheManager {
|
||||
* @return
|
||||
*/
|
||||
public List<LiveClassBean> getLiveClass() {
|
||||
return getList(KEY_LIVE_CLASS, new TypeToken<List<LiveClassBean>>() {
|
||||
List<LiveClassBean> liveModels = new ArrayList<>();
|
||||
List<LiveClassBean> liveClassBeans = getList(KEY_LIVE_CLASS, new TypeToken<List<LiveClassBean>>() {
|
||||
}.getType());
|
||||
if (WordUtil.isNewZh()) {
|
||||
for (int i = 0; i < liveClassBeans.size(); i++) {
|
||||
if (TextUtils.equals(liveClassBeans.get(i).getEnglish(), "Hot") || TextUtils.equals(liveClassBeans.get(i).getEnglish(), "hot") || TextUtils.equals(liveClassBeans.get(i).getEnglish(), "熱門")) {
|
||||
liveModels.add(0, liveClassBeans.get(i));
|
||||
} else {
|
||||
liveModels.add(liveClassBeans.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < liveClassBeans.size(); i++) {
|
||||
if (TextUtils.equals(liveClassBeans.get(i).getEnglish(), "English") || TextUtils.equals(liveClassBeans.get(i).getEnglish(), "english")
|
||||
|| TextUtils.equals(liveClassBeans.get(i).getEnglish(), "英語")) {
|
||||
liveModels.add(0, liveClassBeans.get(i));
|
||||
} else {
|
||||
liveModels.add(liveClassBeans.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return liveModels;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 连麦用户申请列表维护
|
||||
*/
|
||||
public class MicUserManager extends BaseCacheManager {
|
||||
private String micKey = "TYPE_MIC_REQUEST";
|
||||
private List<UserBean> micUsers = new ArrayList<>();
|
||||
private static MicUserManager manager;
|
||||
|
||||
public MicUserManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public static MicUserManager get() {
|
||||
if (null == manager) {
|
||||
manager = new MicUserManager(CommonAppContext.sInstance.getBaseContext());
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void upDataMicUser(JSONObject map) {
|
||||
boolean isHave = false;
|
||||
for (int i = 0; i < micUsers.size(); i++) {
|
||||
if (TextUtils.equals(micUsers.get(i).getId(), map.getString("uid"))) {
|
||||
isHave = true;
|
||||
}
|
||||
}
|
||||
if (!isHave){
|
||||
UserBean userModel = new UserBean();
|
||||
|
||||
UserBean.DressBean dressAvatar = null;
|
||||
if (!TextUtils.isEmpty(map.getString("dress_avatar"))) {
|
||||
dressAvatar = new UserBean.DressBean();
|
||||
dressAvatar.setAvatar_frame(map.getString("dress_avatar"));
|
||||
}
|
||||
|
||||
userModel.setAvatar(map.getString("avatar"));
|
||||
userModel.setId(map.getString("uid"));
|
||||
userModel.setUserNiceName(map.getString("uname"));
|
||||
userModel.setDress(dressAvatar);
|
||||
userModel.setSex(map.getIntValue("sex"));
|
||||
userModel.setLevel(map.getIntValue("level"));
|
||||
userModel.setTypeMic(2);
|
||||
micUsers.add(userModel);
|
||||
put(micKey, micUsers);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<UserBean> getMicUserList() {
|
||||
if (micUsers.size() < 1) {
|
||||
micUsers = getList(micKey, new TypeToken<List<UserBean>>() {
|
||||
}.getType());
|
||||
}
|
||||
|
||||
return micUsers;
|
||||
}
|
||||
|
||||
public void removeMiscUser(JSONObject map) {
|
||||
micUsers = getMicUserList();
|
||||
if (micUsers == null) return;
|
||||
for (int i = 0; i < micUsers.size(); i++) {
|
||||
if (TextUtils.equals(micUsers.get(i).getId(), map.getString("uid"))) {
|
||||
micUsers.remove(i);
|
||||
}
|
||||
}
|
||||
put(micKey, micUsers);
|
||||
}
|
||||
|
||||
public void removeMiscUser(String uid) {
|
||||
micUsers = getMicUserList();
|
||||
if (micUsers == null) return;
|
||||
for (int i = 0; i < micUsers.size(); i++) {
|
||||
if (TextUtils.equals(micUsers.get(i).getId(), uid)) {
|
||||
micUsers.remove(i);
|
||||
}
|
||||
}
|
||||
put(micKey, micUsers);
|
||||
}
|
||||
|
||||
public void removeAllMicUserList() {
|
||||
deleteByKey(micKey);
|
||||
micUsers.clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 处于连麦中的人员维护列表
|
||||
*/
|
||||
public class MicedUserManager extends BaseCacheManager {
|
||||
private String micKey = "TYPE_MIC_LIST";
|
||||
private List<UserBean> micUsers = new ArrayList<>();
|
||||
|
||||
public MicedUserManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private static MicedUserManager manager;
|
||||
|
||||
|
||||
public static MicedUserManager get() {
|
||||
if (null == manager) {
|
||||
manager = new MicedUserManager(CommonAppContext.sInstance.getBaseContext());
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
|
||||
public void upDataMicUserList(List<LinkMicUserBean> list) {
|
||||
micUsers.clear();
|
||||
if (list == null || list.size() < 1) return;
|
||||
for (LinkMicUserBean linkMicUserBean : list) {
|
||||
if (!TextUtils.equals(linkMicUserBean.getId(),
|
||||
String.valueOf(IMLoginManager.get(
|
||||
CommonAppContext.sInstance.getBaseContext()).
|
||||
getUserInfo().getId()))) {
|
||||
|
||||
UserBean userModel = new UserBean();
|
||||
UserBean.DressBean dressAvatar = null;
|
||||
if (!TextUtils.isEmpty(linkMicUserBean.getDressAvatar())) {
|
||||
dressAvatar = new UserBean.DressBean();
|
||||
dressAvatar.setAvatar_frame(linkMicUserBean.getDressAvatar());
|
||||
}
|
||||
|
||||
userModel.setAvatar(linkMicUserBean.getAvatar());
|
||||
userModel.setId(linkMicUserBean.getId());
|
||||
userModel.setUserNiceName(linkMicUserBean.getUserNicename());
|
||||
userModel.setSex(linkMicUserBean.getSex());
|
||||
userModel.setDress(dressAvatar);
|
||||
userModel.setLevel(linkMicUserBean.getLevel());
|
||||
userModel.setTypeMic(1);
|
||||
micUsers.add(userModel);
|
||||
}
|
||||
}
|
||||
put(micKey, micUsers);
|
||||
}
|
||||
|
||||
public void removeMiscUser(String uid) {
|
||||
micUsers = getMicUserList();
|
||||
if (micUsers == null) return;
|
||||
for (int i = 0; i < micUsers.size(); i++) {
|
||||
if (TextUtils.equals(micUsers.get(i).getId(), uid)) {
|
||||
micUsers.remove(i);
|
||||
}
|
||||
}
|
||||
put(micKey, micUsers);
|
||||
}
|
||||
|
||||
public List<UserBean> getMicUserList() {
|
||||
if (micUsers.size() < 1) {
|
||||
micUsers = getList(micKey, new TypeToken<List<UserBean>>() {
|
||||
}.getType());
|
||||
}
|
||||
|
||||
return micUsers;
|
||||
}
|
||||
|
||||
public void removeAllMicUserList() {
|
||||
deleteByKey(micKey);
|
||||
micUsers.clear();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
@@ -10,6 +11,8 @@ import com.yunbao.common.dialog.OpenAdBottomDialogPopup;
|
||||
import com.yunbao.common.dialog.OpenAdCenterDialogPopup;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -52,29 +55,32 @@ public class OpenAdManager {
|
||||
if (list != null && list.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if(CommonAppContext.getTopActivity()==null){
|
||||
Context context = CommonAppContext.getTopActivity();
|
||||
if (context == null) {
|
||||
context = CommonAppContext.sInstance;
|
||||
}
|
||||
if (context == null) {
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(CommonAppContext.getTopActivity())
|
||||
.activityPopup(new HttpCallback<List<OpenAdModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<OpenAdModel> data) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
Log.i(TAG, "onSuccess: 没有数据");
|
||||
list = new ArrayList<>();
|
||||
return;
|
||||
}
|
||||
list = data;
|
||||
if (isShow) {
|
||||
show(TYPE_HOME, false);
|
||||
}
|
||||
}
|
||||
LiveNetManager.get(context).activityPopup(new HttpCallback<List<OpenAdModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<OpenAdModel> data) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
Log.i(TAG, "onSuccess: 没有数据");
|
||||
list = new ArrayList<>();
|
||||
return;
|
||||
}
|
||||
list = data;
|
||||
if (isShow) {
|
||||
show(TYPE_HOME, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
System.err.println("弹框列表:" + error);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
System.err.println("弹框列表:" + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +95,18 @@ public class OpenAdManager {
|
||||
if (type == OpenAdModel.TYPE_LIVE && !model.userIsPermission(isGuard)) {
|
||||
continue;
|
||||
}
|
||||
if (model.getShowModel() == OpenAdModel.SHOW_ONE) {
|
||||
if (SpUtil.getInstance().getBooleanValue("open_ad_popup_" + model.getId())) {
|
||||
continue;
|
||||
}
|
||||
SpUtil.getInstance().setBooleanValue("open_ad_popup_" + model.getId(), true);
|
||||
}
|
||||
if (model.getShowModel() == OpenAdModel.SHOW_DIY) {
|
||||
String value = SpUtil.getStringValue("open_ad_popup_time_" + model.getId());
|
||||
if (!StringUtil.isEmpty(value) && System.currentTimeMillis() < Long.parseLong(value)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (runnableMap.containsKey(model.getId())) {
|
||||
AdRunnable runnable = runnableMap.get(model.getId());
|
||||
if (runnable != null) {
|
||||
@@ -162,16 +180,16 @@ public class OpenAdManager {
|
||||
return;
|
||||
}
|
||||
showMap.put(model.getId(), true);
|
||||
if (model.getShowModel() == OpenAdModel.SHOW_DIY) {
|
||||
String nextTime= String.valueOf(System.currentTimeMillis() + (Long.parseLong(model.getSection()) * 60 * 1000));
|
||||
SpUtil.setStringValue("open_ad_popup_time_" + model.getId(), nextTime);
|
||||
}
|
||||
if (model.getModel() == OpenAdModel.MODEL_BOTTOM) {
|
||||
new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model)
|
||||
.setListener((bean, position) -> {
|
||||
})
|
||||
.showDialog();
|
||||
new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> {
|
||||
}).showDialog();
|
||||
} else {
|
||||
new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model)
|
||||
.setListener((bean, position) -> {
|
||||
})
|
||||
.showDialog();
|
||||
new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> {
|
||||
}).showDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.Toast;
|
||||
@@ -104,8 +105,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
|
||||
private void initSdk(Activity activity, long gameId, String code) {
|
||||
String appId = getAppId();
|
||||
String appKey = getAppKey();
|
||||
boolean testEnv = isTestEnv();
|
||||
// 初始化sdk
|
||||
SudMGP.initSDK(activity, appId, appKey, isTestEnv(), new ISudListenerInitSDK() {
|
||||
SudMGP.initSDK(activity, appId, appKey, testEnv, new ISudListenerInitSDK() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
loadGame(activity, code, gameId);
|
||||
@@ -279,6 +281,7 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
|
||||
@Override
|
||||
public void onGameLog(String str) {
|
||||
SudFSMMGListener.super.onGameLog(str);
|
||||
Log.e("onGameStarted", "游戏日志:" + str);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,6 +290,7 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
|
||||
*/
|
||||
@Override
|
||||
public void onGameStarted() {
|
||||
Log.e("onGameStarted", "游戏开始--------------------");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.View;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.SudgameCodeModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
@@ -40,7 +41,6 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
/**
|
||||
* true 加载游戏时为测试环境 false 加载游戏时为生产环境
|
||||
*/
|
||||
public static final boolean GAME_IS_TEST_ENV = true;
|
||||
|
||||
/**
|
||||
* 使用的UserId。这里随机生成作演示,开发者将其修改为业务使用的唯一userId
|
||||
@@ -208,7 +208,7 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
*/
|
||||
@Override
|
||||
protected boolean isTestEnv() {
|
||||
return GAME_IS_TEST_ENV;
|
||||
return CommonAppConfig.HOST.contains("ceshi");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -173,11 +173,11 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
} else {
|
||||
listener.onGameMGCommonGameSettle(handle, mgCommonGameSettle);
|
||||
}
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setResults(mgCommonGameSettle.results));
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_GAME_SETTLE));
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN: // 4. 加入游戏按钮点击状态
|
||||
SudMGPMGState.MGCommonSelfClickJoinBtn mgCommonSelfClickJoinBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickJoinBtn.class);
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSeatIndex(mgCommonSelfClickJoinBtn.seatIndex));
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSeatIndex(mgCommonSelfClickJoinBtn.seatIndex).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN));
|
||||
// if (listener == null) {
|
||||
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
// } else {
|
||||
@@ -211,11 +211,12 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN: // 8. 开始游戏按钮点击状态
|
||||
SudMGPMGState.MGCommonSelfClickStartBtn mgCommonSelfClickStartBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickStartBtn.class);
|
||||
if (listener == null) {
|
||||
ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
} else {
|
||||
listener.onGameMGCommonSelfClickStartBtn(handle, mgCommonSelfClickStartBtn);
|
||||
}
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN));
|
||||
// if (listener == null) {
|
||||
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
// } else {
|
||||
// listener.onGameMGCommonSelfClickStartBtn(handle, mgCommonSelfClickStartBtn);
|
||||
// }
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_SHARE_BTN: // 9. 分享按钮点击状态
|
||||
SudMGPMGState.MGCommonSelfClickShareBtn mgCommonSelfClickShareBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickShareBtn.class);
|
||||
@@ -226,8 +227,12 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
}
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_STATE: // 10. 游戏状态
|
||||
Log.e("onGameStateChange", "mg_common_game_state:::::" + "dataJson:::::"+dataJson);
|
||||
SudMGPMGState.MGCommonGameState mgCommonGameState = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonGameState.class);
|
||||
sudFSMMGCache.onGameMGCommonGameState(mgCommonGameState);
|
||||
if (mgCommonGameState.gameState==2){
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_GAME_STATE));
|
||||
}
|
||||
if (listener == null) {
|
||||
ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
} else {
|
||||
@@ -244,11 +249,12 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN: // 12. 结算界面再来一局按钮点击状态(2021-12-27新增)
|
||||
SudMGPMGState.MGCommonSelfClickGameSettleAgainBtn mgCommonSelfClickGameSettleAgainBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickGameSettleAgainBtn.class);
|
||||
if (listener == null) {
|
||||
ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
} else {
|
||||
listener.onGameMGCommonSelfClickGameSettleAgainBtn(handle, mgCommonSelfClickGameSettleAgainBtn);
|
||||
}
|
||||
// if (listener == null) {
|
||||
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
// } else {
|
||||
// listener.onGameMGCommonSelfClickGameSettleAgainBtn(handle, mgCommonSelfClickGameSettleAgainBtn);
|
||||
// }
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN));
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_SOUND_LIST: // 13. 游戏上报游戏中的声音列表(2021-12-30新增,现在只支持碰碰我最强)
|
||||
SudMGPMGState.MGCommonGameSoundList mgCommonGameSoundList = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonGameSoundList.class);
|
||||
@@ -815,7 +821,7 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
if (listener != null && listener.onPlayerStateChange(handle, userId, state, dataJson)) {
|
||||
return;
|
||||
}
|
||||
Log.e("SudFSMMGDecorator", "userId:" + userId + " state:" + state + " dataJson:" + dataJson);
|
||||
Log.e("onPlayerStateChange", "userId:" + userId + " state:" + state + " dataJson:" + dataJson);
|
||||
switch (state) {
|
||||
case SudMGPMGState.MG_COMMON_PLAYER_IN: // 1.加入状态(已修改)
|
||||
SudMGPMGState.MGCommonPlayerIn mgCommonPlayerIn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonPlayerIn.class);
|
||||
|
||||
@@ -89,13 +89,13 @@ public class SudFSTAPPDecorator {
|
||||
* @param isPlaying true 开始游戏,false 结束游戏
|
||||
* @param reportGameInfoExtras string类型,Https服务回调report_game_info参数,最大长度1024字节,超过则截断(2022-01-21)
|
||||
*/
|
||||
public void notifyAPPCommonSelfPlaying(boolean isPlaying, String reportGameInfoExtras, String reportGameInfoKey) {
|
||||
public void notifyAPPCommonSelfPlaying(boolean isPlaying) {
|
||||
ISudFSTAPP iSudFSTAPP = this.iSudFSTAPP;
|
||||
if (iSudFSTAPP != null) {
|
||||
SudMGPAPPState.APPCommonSelfPlaying state = new SudMGPAPPState.APPCommonSelfPlaying();
|
||||
state.isPlaying = isPlaying;
|
||||
state.reportGameInfoExtras = reportGameInfoExtras;
|
||||
state.reportGameInfoKey = reportGameInfoKey;
|
||||
// state.reportGameInfoExtras = deductMoneyKey;
|
||||
// state.reportGameInfoKey = reportGameInfoKey;
|
||||
iSudFSTAPP.notifyStateChange(SudMGPAPPState.APP_COMMON_SELF_PLAYING, SudJsonUtils.toJson(state), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import com.momo.mcamera.util.JsonUtil;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
|
||||
public class JavascriptInterfacePlayLetUtils {
|
||||
private Activity mContext;
|
||||
private WebView mWebView;
|
||||
private static JavascriptInterfacePlayLetUtils sInstance;
|
||||
|
||||
public static JavascriptInterfacePlayLetUtils getInstance() {
|
||||
|
||||
synchronized (JavascriptInterfacePlayLetUtils.class) {
|
||||
|
||||
sInstance = new JavascriptInterfacePlayLetUtils();
|
||||
|
||||
return sInstance;
|
||||
}
|
||||
}
|
||||
|
||||
public JavascriptInterfacePlayLetUtils setmContext(Activity mContext, WebView mWebView) {
|
||||
this.mContext = mContext;
|
||||
this.mWebView = mWebView;
|
||||
// webView.evaluateJavascript("javascript:nativeCallback('" + params + "')", new ValueCallback<String>() {
|
||||
// @Override
|
||||
// public void onReceiveValue(String value) {
|
||||
// }
|
||||
// });
|
||||
return this;
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void postEvent(String name, String data) {
|
||||
Log.e("TAG", "postEvent name==" + name);
|
||||
Log.e("TAG", "postEvent data==" + data);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void postWeakBalance(String data) {
|
||||
CoolConfig coolConfig = new JsonUtil().fromJson(data, CoolConfig.class);
|
||||
Log.e("TAG", "postWeakBalance data==" + data);
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setCoolConfig(coolConfig)
|
||||
.setMethod("postWeakBalance"));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,13 @@ package com.yunbao.common.utils;
|
||||
|
||||
import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_REWARD;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.JavascriptInterface;
|
||||
@@ -25,6 +27,7 @@ import com.yunbao.common.bean.VideoBean;
|
||||
import com.yunbao.common.bean.VideoListBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.event.QuickGiftingEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
@@ -124,10 +127,10 @@ public class JavascriptInterfaceUtils {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
if (url.contains("?")) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
} else {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
if (LiveZhuangBana) {
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url, false);
|
||||
@@ -147,10 +150,10 @@ public class JavascriptInterfaceUtils {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
if (url.contains("?")) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
} else {
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
+ CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
if (LiveZhuangBana) {
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url, title);
|
||||
@@ -259,11 +262,12 @@ public class JavascriptInterfaceUtils {
|
||||
|
||||
/**
|
||||
* 跳转直播并打开礼物栏选中礼物
|
||||
*
|
||||
* @param liveId 直播间id
|
||||
* @param giftId 礼物id
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void androidMethodLookToLiveGift(String liveId,String giftId){
|
||||
public void androidMethodLookToLiveGift(String liveId, String giftId) {
|
||||
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
@@ -300,6 +304,7 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidMethodLookToLive(String liveId) {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
@@ -598,6 +603,18 @@ public class JavascriptInterfaceUtils {
|
||||
.setMethod("clickLogOffAccount"));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidClickToTaskPage() {
|
||||
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
||||
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidQuickGiftRemainingQuantity(int giftRemainingQuantity) {
|
||||
Bus.get().post(new QuickGiftingEvent().setGiftRemainingQuantity(String.valueOf(giftRemainingQuantity)));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupBuy(String id) {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
@@ -644,8 +661,9 @@ public class JavascriptInterfaceUtils {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidCancelAnchorAttention"));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidLnsufficientBalanceClick(String msg){
|
||||
public void androidLnsufficientBalanceClick(String msg) {
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
@@ -659,4 +677,5 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,11 +60,19 @@ public class ToastUtil {
|
||||
/**
|
||||
* 显示黑底白字的提示
|
||||
*
|
||||
* @param content 内容
|
||||
* @param content 内容
|
||||
* @param delayMillis 显示时间 毫秒
|
||||
*/
|
||||
public static void showStyle(String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(CommonAppContext.getTopActivity(), R.style.dialog);
|
||||
Context context = CommonAppContext.getTopActivity();
|
||||
if (context == null) {
|
||||
context = CommonAppContext.sInstance;
|
||||
}
|
||||
if (context == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
@@ -79,14 +87,16 @@ public class ToastUtil {
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
public static void showDebug(String s){
|
||||
if(BuildConfig.DEBUG){
|
||||
show("开发模式:"+s);
|
||||
|
||||
public static void showDebug(String s) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
show("开发模式:" + s);
|
||||
}
|
||||
}
|
||||
public static void showDebug(int s){
|
||||
if(BuildConfig.DEBUG){
|
||||
show("开发模式:"+s);
|
||||
|
||||
public static void showDebug(int s) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
show("开发模式:" + s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,10 +104,10 @@ public class ToastUtil {
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
return;
|
||||
}
|
||||
Log.i("Toast", "Toast show: "+s);
|
||||
Log.i("ts","ll");
|
||||
Toast.makeText(CommonAppContext.sInstance,s,Toast.LENGTH_SHORT).show();
|
||||
Log.i("ts","22");
|
||||
Log.i("Toast", "Toast show: " + s);
|
||||
Log.i("ts", "ll");
|
||||
Toast.makeText(CommonAppContext.sInstance, s, Toast.LENGTH_SHORT).show();
|
||||
Log.i("ts", "22");
|
||||
|
||||
// long curTime = System.currentTimeMillis();
|
||||
// if (curTime - sLastTime > 2000) {
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
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.adapter.LiveSudGameHistoryAdapter;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.bean.GameRecordModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.SudGameListSelectPopup;
|
||||
import com.yunbao.common.event.LiveSudGameHistoryEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
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;
|
||||
|
||||
public class LiveSudGameHistoryPopup extends BottomPopupView {
|
||||
private CommonRefreshView mRefreshView;
|
||||
private LiveSudGameHistoryAdapter sudGameListAdapter;
|
||||
private String sudGameId = "0", currencyType = "0", dateType = "0";
|
||||
private String sudGameIdName, currencyTypeName, dateTypeName;
|
||||
private int page = 1;
|
||||
|
||||
private TextView gameTitle, roomSillText, houseOwnerText;
|
||||
|
||||
private ImageView houseOwnerArrow, roomSillArrow, roomGameArrow;
|
||||
private long animDuration = 500;
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
|
||||
public LiveSudGameHistoryPopup(@NonNull Context context, List<CustomSidebarChildModel> customSidebarChildModels) {
|
||||
super(context);
|
||||
this.customSidebarChildModels = customSidebarChildModels;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_live_sud_game_history;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
Bus.getOn(this);
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
Bus.getOff(this);
|
||||
super.onDismiss();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mRefreshView = findViewById(R.id.refreshView);
|
||||
gameTitle = findViewById(R.id.game_title);
|
||||
roomSillText = findViewById(R.id.room_sill_text);
|
||||
houseOwnerText = findViewById(R.id.house_owner_text);
|
||||
houseOwnerArrow = findViewById(R.id.house_owner_arrow);
|
||||
roomSillArrow = findViewById(R.id.room_sill_arrow);
|
||||
roomGameArrow = findViewById(R.id.room_game_arrow);
|
||||
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
sudGameListAdapter = new LiveSudGameHistoryAdapter(getContext());
|
||||
mRefreshView.setLoadMoreEnable(true);
|
||||
mRefreshView.setRecyclerViewAdapter(sudGameListAdapter);
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GameRecordModel>() {
|
||||
@Override
|
||||
public RefreshAdapter<GameRecordModel> getAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
page = p;
|
||||
LiveHttpUtil.gameRecord(sudGameId, currencyType, dateType, p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GameRecordModel> processData(String[] info) {
|
||||
if (info.length > 0) {
|
||||
List<GameRecordModel> sudRoomListModels = new ArrayList<>();
|
||||
for (String json : info) {
|
||||
GameRecordModel model = new Gson().fromJson(json, GameRecordModel.class);
|
||||
sudRoomListModels.add(model);
|
||||
}
|
||||
return sudRoomListModels;
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GameRecordModel> list, int listCount) {
|
||||
Log.i("onRefreshSuccess", listCount + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GameRecordModel> loadItemList, int loadItemCount) {
|
||||
sudGameListAdapter.insertList(loadItemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
mRefreshView.initData();
|
||||
mRefreshView.setEmptyLayoutId(R.layout.sud_game_no);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.house_owner), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(houseOwnerArrow, "rotation", 0f, 90f);
|
||||
animator.setDuration(500);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.house_owner));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 6, currencyTypeName)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent(houseOwnerArrow);
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_sill), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 0f, 90f);
|
||||
animator.setDuration(500);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.room_sill));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 7, dateTypeName)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent(roomSillArrow);
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.interactive_game_room_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 0f, 90f);
|
||||
animator.setDuration(500);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.interactive_game_room_game));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), sudGameIdName, customSidebarChildModels)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent(roomGameArrow);
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void closeAnimSudGameListEvent(View view) {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 90f, 0f);
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
sudGameIdName = getContext().getString(R.string.interactive_game_create_unlimited);
|
||||
currencyTypeName = getContext().getString(R.string.interactive_game_create_unlimited);
|
||||
dateTypeName = getContext().getString(R.string.interactive_game_create_unlimited);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveSudGameHistoryEvent(LiveSudGameHistoryEvent event) {
|
||||
if (event.getIndex() == 3) {
|
||||
currencyTypeName = event.getTypeName();
|
||||
currencyType = event.getType();
|
||||
houseOwnerText.setText(currencyTypeName);
|
||||
} else if (event.getIndex() == 2) {
|
||||
dateTypeName = event.getTypeName();
|
||||
dateType = event.getType();
|
||||
roomSillText.setText(dateTypeName);
|
||||
}else if (event.getIndex() == 1) {
|
||||
sudGameIdName = event.getTypeName();
|
||||
sudGameId = event.getType();
|
||||
gameTitle.setText(sudGameIdName);
|
||||
}
|
||||
|
||||
mRefreshView.initData();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GameRecordModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class LiveSudGameHistoryViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView sudGameName, sudGameTime, sudGameUser, sudGameCoin;
|
||||
|
||||
private ImageView sudGameType;
|
||||
|
||||
public LiveSudGameHistoryViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
sudGameName = itemView.findViewById(R.id.sud_game_name);
|
||||
sudGameTime = itemView.findViewById(R.id.sud_game_time);
|
||||
sudGameUser = itemView.findViewById(R.id.sud_game_user);
|
||||
sudGameCoin = itemView.findViewById(R.id.sud_game_coin);
|
||||
sudGameType = itemView.findViewById(R.id.sud_game_type);
|
||||
}
|
||||
|
||||
public void setData(GameRecordModel model) {
|
||||
sudGameName.setText(model.getTitle());
|
||||
sudGameTime.setText(model.getGameEndTime());
|
||||
sudGameCoin.setText(String.valueOf(model.getSettlement()));
|
||||
if (model.getCurrencyType() == 3) {
|
||||
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.gold_coin, sudGameType);
|
||||
}
|
||||
if (model.getCurrencyType() == 2) {
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_collectibles, sudGameType);
|
||||
}
|
||||
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
for (int i = 0; i < model.getUserName().size(); i++) {
|
||||
stringBuffer.append(model.getUserName().get(i))
|
||||
.append("/");
|
||||
}
|
||||
if (stringBuffer.length() > 0) {
|
||||
sudGameUser.setText(stringBuffer.toString().substring(0, stringBuffer.toString().length() - 1));
|
||||
} else {
|
||||
sudGameUser.setText(stringBuffer.toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,19 +9,25 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.Observer;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
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.event.HideShowEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.ShowHideEvent;
|
||||
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.model.GameViewInfoModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -29,6 +35,8 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -43,6 +51,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
private CreateSudRoomModel mCreateSudRoomModel;
|
||||
private TextView gameTitle, roomName, roomNumber;
|
||||
private RoundedImageView mAvatar;
|
||||
private boolean selfClick = false;
|
||||
|
||||
public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) {
|
||||
super(context);
|
||||
@@ -90,7 +99,48 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
gameViewModel.onDestroy();
|
||||
dialog.dismiss();
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(2));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.min_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (IMLoginManager.get(getContext()).getSudGameMin()) {
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(1));
|
||||
Bus.get().post(new ShowHideEvent());
|
||||
} else {
|
||||
IMLoginManager.get(getContext()).setSudGameMin();
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new HintCustomPopup(getContext(),
|
||||
getContext().getString(R.string.dialog_tip),
|
||||
getContext().getString(R.string.currently_in_the_game))
|
||||
.setLiveOpenOk(getContext().getString(R.string.sud_in_game_minimize))
|
||||
.setLiveOpenCancel(getContext().getString(R.string.cancel))
|
||||
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||
@Override
|
||||
public void onSure() {
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(1));
|
||||
Bus.get().post(new ShowHideEvent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
|
||||
}
|
||||
})).show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
gameViewModel.gameViewLiveData.observe(this, new Observer<View>() {
|
||||
@@ -108,52 +158,120 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
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) getContext(), mLiveUid, mInteractionID);
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
|
||||
private void initDate() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getCustomSidebarInfo("1", new HttpCallback<List<CustomSidebarInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<CustomSidebarInfoModel> data) {
|
||||
for (CustomSidebarInfoModel datum : data) {
|
||||
if (datum.getType().equals("6")) {
|
||||
customSidebarChildModels = datum.getChild();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void BusGetOff() {
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
Bus.getOff(this);
|
||||
public void dismiss() {
|
||||
|
||||
super.dismiss();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onHideShow(HideShowEvent event) {
|
||||
if (event.isClose()) {
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(2));
|
||||
} else {
|
||||
if (event.isHide()) {
|
||||
findViewById(R.id.min_game).setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
super.onDismiss();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
|
||||
if (event.getResults().size() > 0) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
LiveNetManager.get(getContext()).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (data.getGoldenBeanRemainingBalance() == 1) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("金豆不够 ");
|
||||
}else {
|
||||
ToastUtil.show("Insufficient money ");
|
||||
switch (event.getSudMGPMGState()) {
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
|
||||
LiveNetManager.get(getContext()).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (data.getGoldenBeanRemainingBalance() == 1) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣数量不足 ");
|
||||
} else {
|
||||
ToastUtil.show("Shortage of money");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("金豆不够 ");
|
||||
}else {
|
||||
ToastUtil.show("Insufficient money ");
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (IMLoginManager.get(getContext()).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(getContext()).gameStartCheckRemainingBalance(mCreateSudRoomModel.getSudGameId(),
|
||||
mCreateSudRoomModel.getSudGameRoomId(), new
|
||||
HttpCallback<CheckRemainingBalance>() {
|
||||
@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(getContext()).deductMoney(mCreateSudRoomModel.getSudGameRoomId());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.SudRoomListModel;
|
||||
import com.yunbao.common.event.LiveOpenSudRoomEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||
import com.yunbao.common.event.SudGameListRefreshEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@@ -40,7 +41,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber;
|
||||
private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5;
|
||||
private ImageView gifImageView;
|
||||
private ImageView sex, game_icon;
|
||||
private ImageView sex, game_icon, gold_coin;
|
||||
|
||||
|
||||
public SudGameListViewHolder(@NonNull View itemView) {
|
||||
@@ -57,6 +58,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
avatarList3 = itemView.findViewById(R.id.avatar_list3);
|
||||
avatarList4 = itemView.findViewById(R.id.avatar_list4);
|
||||
avatarList5 = itemView.findViewById(R.id.avatar_list5);
|
||||
gold_coin = itemView.findViewById(R.id.gold_coin);
|
||||
sex = itemView.findViewById(R.id.sex);
|
||||
avatarList1.setVisibility(View.GONE);
|
||||
avatarList2.setVisibility(View.GONE);
|
||||
@@ -77,6 +79,11 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
} else if (TextUtils.equals(model.getSex(), "2")) {
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_woman, sex);
|
||||
}
|
||||
if (TextUtils.equals(model.getCurrencyType(), "2")) {
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.icon_collectibles, gold_coin);
|
||||
} else {
|
||||
ImgLoader.display(itemView.getContext(), R.mipmap.gold_coin, gold_coin);
|
||||
}
|
||||
ImgLoader.display(itemView.getContext(), model.getSudgameicon(), game_icon);
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.layout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
@@ -133,7 +140,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
public void run() {
|
||||
Bus.get().post(new LiveOpenSudRoomEvent().setCreateSudRoomModel(createSudRoomModel));
|
||||
}
|
||||
},1500);
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,13 +167,8 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
|
||||
} else {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.enableDrag(false)
|
||||
.dismissOnTouchOutside(false)
|
||||
.dismissOnBackPressed(false)
|
||||
.asCustom(new LiveSudGamePopup(itemView.getContext(), createSudRoomModel))
|
||||
.show();
|
||||
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
|
||||
Bus.get().post(new SudGameListDissMissEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class CircleProgress2 extends View {
|
||||
private Paint mPaint;
|
||||
private RectF mRectF;
|
||||
private int mCurrent = 10, mMax = 100;
|
||||
//圆弧(也可以说是圆环)的宽度
|
||||
private float mArcWidth =7;
|
||||
//控件的宽度
|
||||
private float mWidth;
|
||||
|
||||
public CircleProgress2(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CircleProgress2(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CircleProgress2(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mPaint = new Paint();
|
||||
mPaint.setAntiAlias(true);
|
||||
mRectF = new RectF();
|
||||
}
|
||||
|
||||
public void setCurrent(int mCurrent) {
|
||||
this.mCurrent = mCurrent;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setMax(int mMax) {
|
||||
this.mMax = mMax;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
//getMeasuredWidth获取的是view的原始大小,也就是xml中配置或者代码中设置的大小
|
||||
//getWidth获取的是view最终显示的大小,这个大小不一定等于原始大小
|
||||
mWidth = getMeasuredWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
//设置圆弧的宽度(圆环的宽度)
|
||||
mPaint.setStrokeWidth(mArcWidth);
|
||||
mPaint.setColor(Color.TRANSPARENT);
|
||||
//大圆的半径
|
||||
float bigCircleRadius = mWidth / 2;
|
||||
//小圆的半径
|
||||
float smallCircleRadius = bigCircleRadius;
|
||||
//绘制小圆
|
||||
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
|
||||
mPaint.setColor(Color.parseColor("#FEC51B"));
|
||||
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
|
||||
//绘制圆弧
|
||||
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
|
||||
setBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
}
|
||||
5
common/src/main/res/drawable/backgroud_panda_time.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#9946433F" />
|
||||
<corners android:radius="200dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
|
||||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="16dp" android:topLeftRadius="16dp" android:topRightRadius="0dp" />
|
||||
<gradient android:angle="360" android:endColor="#F6F5FF" android:startColor="#D3E3FF" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
BIN
common/src/main/res/drawable/background_live_sud_hint.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="76dp" android:height="27dp">
|
||||
<item android:width="76dp" android:height="27dp" android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ff40beff" />
|
||||
<corners android:topLeftRadius="13dp" android:topRightRadius="13dp" android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" />
|
||||
<corners android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" android:topLeftRadius="13dp" android:topRightRadius="13dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:width="76dp" android:height="27dp" android:state_selected="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#4A4A4A" />
|
||||
<corners android:bottomLeftRadius="13dp" android:bottomRightRadius="13dp" android:topLeftRadius="13dp" android:topRightRadius="13dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
5
common/src/main/res/drawable/bg_live_sud_random_home.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="14dp" />
|
||||
<solid android:color="#FFB72B" />
|
||||
</shape>
|
||||
@@ -29,10 +29,17 @@
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@mipmap/icon_interactive_game_create_room_seats" />
|
||||
android:src="@mipmap/icon_interactive_game_create_room_seats"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
@@ -65,10 +72,10 @@
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="35dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
171
common/src/main/res/layout/cinema_ticket_popup.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="475dp"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:background="@mipmap/background_cinema_ticket"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cinema_ticket_close"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_margin="12dp"
|
||||
android:src="@mipmap/icon_cinema_ticket_close" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="222dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_cinema_ticket_title" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="15dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cinema_ticket"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="#DFEAFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/icon_cinema_ticket" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="35dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/conversion_quantity"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="25dp"
|
||||
android:background="@mipmap/backgroud_tickets_plus_minus">
|
||||
|
||||
<View
|
||||
android:id="@+id/sub"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tickets_plus_minus"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="#000000"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/add"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quantity_need"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/conversion_quantity_need"
|
||||
android:textColor="#DFEAFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:src="@mipmap/icon_collectibles2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/cinema_ticket_exchange"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/backgroundn_cinema_ticket_exchange" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:layout_marginBottom="23dp"
|
||||
android:background="@drawable/background_cinema_ticket_hint">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/conversion_quantity_need_of_use"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="11dp"
|
||||
android:text="@string/conversion_quantity_need_of_use1"
|
||||
android:textColor="#000000"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/conversion_quantity_need_of_use2"
|
||||
android:textColor="#000000"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/conversion_quantity_need_of_use3"
|
||||
android:textColor="#000000"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
@@ -40,45 +40,66 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="end"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:hint="@string/interactive_game_create_room_name_input"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:hint="@string/interactive_game_create_room_name_input"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/create_game_random"
|
||||
android:layout_width="57dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_live_sud_random_home"
|
||||
android:gravity="center"
|
||||
|
||||
android:text="@string/sud_in_game_random_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="end"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_game_type"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
@@ -87,6 +108,7 @@
|
||||
android:id="@+id/create_game_type"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
@@ -99,36 +121,73 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="end"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_game_sill"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/game_sill"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:ellipsize="end"
|
||||
android:hint="@string/interactive_game_create_gold_bean_quantity"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxEms="5"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:singleLine="true"
|
||||
android:paddingBottom="9dp"
|
||||
android:digits="1234567890"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/currency_type"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_currency_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/golden_bean"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_game_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/game_sill"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_live_sud_list_input"
|
||||
android:digits="1234567890"
|
||||
android:ellipsize="end"
|
||||
android:hint="@string/interactive_game_create_gold_bean_quantity"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxEms="5"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -41,54 +41,76 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:gravity="end"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="#000"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:hint="@string/interactive_game_create_room_name_input"
|
||||
android:paddingStart="12dp"
|
||||
android:singleLine="true"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:textColor="#E6000000"
|
||||
android:textColorHint="#E6000000"
|
||||
android:textSize="10sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:hint="@string/interactive_game_create_room_name_input"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#E6000000"
|
||||
android:textColorHint="#E6000000"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/create_game_random"
|
||||
android:layout_width="57dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_live_sud_random_home"
|
||||
android:gravity="center"
|
||||
|
||||
android:text="@string/sud_in_game_random_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:gravity="end"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_game_type"
|
||||
android:textColor="#000"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/create_game_type"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
@@ -101,36 +123,74 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:gravity="end"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/interactive_game_create_game_sill"
|
||||
android:textColor="#000"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/game_sill"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:digits="1234567890"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:hint="@string/interactive_game_create_gold_bean_quantity"
|
||||
android:inputType="numberDecimal"
|
||||
android:paddingStart="12dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:maxEms="5"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:textColor="#E6000000"
|
||||
android:textColorHint="#E6000000"
|
||||
android:textSize="10sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/currency_type"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_currency_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/golden_bean"
|
||||
android:textColor="#E6000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_game_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/game_sill"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/bg_live_sud_list_input_home"
|
||||
android:digits="1234567890"
|
||||
android:ellipsize="end"
|
||||
android:hint="@string/interactive_game_create_gold_bean_quantity"
|
||||
android:inputType="numberDecimal"
|
||||
android:maxEms="5"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#E6000000"
|
||||
android:textColorHint="#E6000000"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_height="395dp"
|
||||
android:background="@drawable/bg_live_tota"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
android:id="@+id/drawerList"
|
||||
android:overScrollMode="never"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="384dp" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -2,7 +2,7 @@
|
||||
<LinearLayout 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="580dp"
|
||||
android:layout_height="650dp"
|
||||
android:background="@drawable/bg_live_sud_list"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -28,11 +28,19 @@
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/min_game"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@mipmap/icon_interactive_game_create_room_seats" />
|
||||
android:src="@mipmap/icon_min_game"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
@@ -66,9 +74,9 @@
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -91,9 +99,10 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="98dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
219
common/src/main/res/layout/dialog_live_sud_game_history.xml
Normal file
@@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="585dp"
|
||||
android:background="@mipmap/background_sud_history"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/sud_in_game_game_record"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:text="@string/interactive_game_room_game"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/interactive_game_room_game"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_home_sud_list_btn"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_title"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_game_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/sud_in_game_game_time"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/room_sill"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_home_sud_list_btn">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_sill_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_sill_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/sud_in_game_game_currency"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/house_owner"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_home_sud_list_btn"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/house_owner_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/house_owner_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_home_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxWidth="150dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sud_in_game_game_game_type"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxWidth="150dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sud_in_game_game_currency_item"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxWidth="150dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sud_in_game_game_game_settlement_time"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxWidth="150dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sud_in_game_game_game_peer_user"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
@@ -32,6 +32,14 @@
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search"
|
||||
android:layout_width="30dp"
|
||||
@@ -49,137 +57,144 @@
|
||||
android:src="@mipmap/icon_interactive_game__add" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_rule_bottom"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:src="@mipmap/icon_interactive_game__ranking"
|
||||
android:visibility="gone" />
|
||||
android:src="@mipmap/icon_sud_rule_bottom"
|
||||
android:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:text="@string/interactive_game_room_game"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/interactive_game_room_game"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_title"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:layout_marginStart="14dp"
|
||||
android:text="@string/interactive_game_room_game"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
<LinearLayout
|
||||
android:id="@+id/interactive_game_room_game"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_game_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/game_title"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/interactive_game_room_sill"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/room_sill"
|
||||
android:layout_width="82dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn">
|
||||
<ImageView
|
||||
android:id="@+id/room_game_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_sill_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/interactive_game_room_sill"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_sill_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/room_sill"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/interactive_game_room_house_owner"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
<TextView
|
||||
android:id="@+id/room_sill_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/house_owner"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/room_sill_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/house_owner_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/interactive_game_room_house_owner"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
<LinearLayout
|
||||
android:id="@+id/house_owner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_live_sud_list_btn"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/house_owner_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
<TextView
|
||||
android:id="@+id/house_owner_text"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_create_unlimited"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/house_owner_arrow"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_interactive_game_arrow" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<TextView
|
||||
android:id="@+id/live_open_cancel"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
@@ -49,7 +49,7 @@
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/back"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -59,7 +59,7 @@
|
||||
<TextView
|
||||
android:id="@+id/live_open_ok"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/backgroud_live_open_right"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gold_coin"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginStart="2dp"
|
||||
|
||||
64
common/src/main/res/layout/item_live_sud_game_history.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_game_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/sud_in_game_game_game_type"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_game_type"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
|
||||
android:src="@mipmap/icon_collectibles" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_game_coin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/sud_in_game_game_game_type"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_game_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/sud_in_game_game_game_type"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sud_game_user"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/sud_in_game_game_game_type"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
@@ -175,6 +175,7 @@
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gold_coin"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginStart="2dp"
|
||||
|
||||
29
common/src/main/res/layout/sud_game_no.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_sud_no_data" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="-80dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/sud_in_game_game_game_peer_user_nodata"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
101
common/src/main/res/layout/sud_game_rule_bottom_popup.xml
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:background="@drawable/bg_live_sud_list"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/regular_bubble"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint1"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint3"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint5"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_rule_close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:src="@mipmap/icon_sud_rule_close_bottom" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
110
common/src/main/res/layout/sud_game_rule_popup.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="match_parent"
|
||||
android:background="@color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="12dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/regular_bubble"
|
||||
android:textColor="#FFA800"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint1"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint2"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint3"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint4"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/sud_in_game_rule_hint5"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_rule_close"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:src="@mipmap/icon_sud_rule_close" />
|
||||
</FrameLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 104 KiB |
BIN
common/src/main/res/mipmap-b+en+us/icon_cinema_ticket_title.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
common/src/main/res/mipmap-hdpi/icon_pd_pao.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
common/src/main/res/mipmap-hdpi/icon_user_home_living_en.gif
Normal file
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/background_sud_game_float.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/background_sud_history.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_collectibles.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_combo.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_min_game.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_game_min.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_history.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_history_back.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_history_live.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_history_live2.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_no_data.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_rule.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_rule_bottom.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_rule_close.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_sud_rule_close_bottom.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.9 KiB |