diff --git a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java index f9d17f0bc..31ec7463f 100644 --- a/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/SudGameActivity.java @@ -27,7 +27,6 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; -import java.util.List; import java.util.Locale; public class SudGameActivity extends AbsActivity { @@ -97,10 +96,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.lobby_game_setting.hide = true; // 配置不隐藏ping值 + gameConfigModel.ui.game_settle_again_btn.custom = true; + gameConfigModel.ui.start_btn.custom = true; // SudMGP平台64bit游戏ID gameViewModel.switchGame((Activity) mContext, mLiveUid, mInteractionID); @@ -118,32 +119,57 @@ 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() { - @Override - public void onSuccess(CheckRemainingBalance data) { - if (data.getGoldenBeanRemainingBalance() == 1) { - gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); - } else { + switch (event.getSudMGPMGState()) { + case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN: + case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN: + LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback() { + @Override + public void onSuccess(CheckRemainingBalance data) { + if (data.getGoldenBeanRemainingBalance() == 1) { + gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); + } else { + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("金豆不够 "); + } else { + ToastUtil.show("Insufficient money "); + } + + } + } + + @Override + public void onError(String error) { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { ToastUtil.show("金豆不够 "); - }else { + } else { ToastUtil.show("Insufficient money "); } } - } + }); + break; + case SudMGPMGState.MG_COMMON_GAME_SETTLE: + gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1); + break; + case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN: + LiveNetManager.get(mContext).gameStartCheckRemainingBalance(mCreateSudRoomModel.getSudGameId(), + mCreateSudRoomModel.getSudGameRoomId(), new + HttpCallback() { + @Override + public void onSuccess(CheckRemainingBalance data) { + if (data.getStatus()==1){ + gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true); + }else { - @Override - public void onError(String error) { - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("金豆不够 "); - }else { - ToastUtil.show("Insufficient money "); - } - } - }); + } + + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + break; } } diff --git a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java index 399eb1dfa..ca8d2f3f9 100644 --- a/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java +++ b/common/src/main/java/com/yunbao/common/bean/CheckRemainingBalance.java @@ -2,16 +2,27 @@ 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; - public int getGoldenBeanRemainingBalance() { - return goldenBeanRemainingBalance; - } + public int getStatus() { + return status; + } - public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) { - this.goldenBeanRemainingBalance = goldenBeanRemainingBalance; - } + public CheckRemainingBalance setStatus(int status) { + this.status = status; + return this; + } + + public int getGoldenBeanRemainingBalance() { + return goldenBeanRemainingBalance; + } + + public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) { + this.goldenBeanRemainingBalance = goldenBeanRemainingBalance; + } } diff --git a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java index c8ff09ae8..c31fb2b55 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java @@ -28,7 +28,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.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import org.greenrobot.eventbus.Subscribe; @@ -37,6 +37,7 @@ 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 customSidebarChildModels = new ArrayList<>(); @@ -46,6 +47,7 @@ public class CreateSudGamePopup extends BottomPopupView { private String id; private boolean isHomeView; private boolean isHome = false; + private List roomNames = new ArrayList<>(); public CreateSudGamePopup(@NonNull Context context, List child, boolean isHome) { super(context); @@ -72,13 +74,21 @@ public class CreateSudGamePopup extends BottomPopupView { protected void onCreate() { super.onCreate(); Bus.getOn(this); - initView(); initDate(); + initView(); } - private void initDate() { + private String userName; + private void initDate() { + 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() ? "你的籌碼我收下了!" : ".I have taken your chips!"); + roomNames.add(WordUtil.isNewZh() ? "在線等遊戲夥伴~" : "Waiting for game partners online~ "); + roomNames.add(WordUtil.isNewZh() ? "決戰到天亮 " : "Fight until dawn"); + roomNames.add(WordUtil.isNewZh() ? userName + "的房间 " : userName + "‘s room"); } private void initView() { @@ -169,14 +179,14 @@ public class CreateSudGamePopup extends BottomPopupView { } return; } - if (sill.length() > 6 ){ + if (sill.length() > 6) { if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { ToastUtil.show("数量区间为100--5W"); } else { ToastUtil.show("The quantity range is 100 to 5 W"); } return; - }else { + } else { int sillNumber = Integer.parseInt(sill); if (sillNumber < 100 || sillNumber > 50000) { if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { @@ -186,7 +196,7 @@ public class CreateSudGamePopup extends BottomPopupView { } return; } - if (sillNumber%10!=0){ + if (sillNumber % 10 != 0) { if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { ToastUtil.show("金豆數量必須為10的倍數"); } else { @@ -221,6 +231,15 @@ 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)); + } + }); } @Override diff --git a/common/src/main/java/com/yunbao/common/event/CheckRemainingBalanceEvent.java b/common/src/main/java/com/yunbao/common/event/CheckRemainingBalanceEvent.java index 94667df04..09471d14f 100644 --- a/common/src/main/java/com/yunbao/common/event/CheckRemainingBalanceEvent.java +++ b/common/src/main/java/com/yunbao/common/event/CheckRemainingBalanceEvent.java @@ -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 results = new ArrayList<>(); + public int seatIndex=0; + private String SudMGPMGState; - public List getResults() { - return results; + public String getSudMGPMGState() { + return SudMGPMGState; } - public CheckRemainingBalanceEvent setResults(List results) { - this.results = results; + public CheckRemainingBalanceEvent setSudMGPMGState(String sudMGPMGState) { + SudMGPMGState = sudMGPMGState; return this; } diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index 731a43d1d..59dff12c6 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -1048,5 +1048,9 @@ public interface PDLiveApi { @GET("/api/public/?service=Home.activityPopup") Observable>> activityPopup(); - + @GET("/api/public/?service=Sudgameserver.gameStartCheckRemainingBalance") + Observable> gameStartCheckRemainingBalance( + @Query("mg_id") String mgId, + @Query("room_id") String roomId + ); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 37c58fd8e..6bba433fa 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -63,6 +63,7 @@ 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; @@ -2314,6 +2315,34 @@ public class LiveNetManager { }).isDisposed(); } + public void gameStartCheckRemainingBalance(String mgId, String roomId, HttpCallback callback) { + API.get().pdLiveApi(mContext) + .gameStartCheckRemainingBalance(mgId, roomId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>() { + @Override + public void accept(ResponseModel 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() { + @Override + public void accept(Throwable throwable) throws Exception { + if (callback != null) { + + callback.onError(WordUtil.isNewZh() ? "金豆不够" : "Insufficient money "); + } + } + }).isDisposed(); + } + public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, int page, HttpCallback> callback) { API.get().pdLiveApi(mContext) .getRoomList(sudGameId, threshold, roomHolderType, liveUid, page) diff --git a/common/src/main/java/com/yunbao/common/sud/decorator/SudFSMMGDecorator.java b/common/src/main/java/com/yunbao/common/sud/decorator/SudFSMMGDecorator.java index c6b7d4883..9f1fda279 100644 --- a/common/src/main/java/com/yunbao/common/sud/decorator/SudFSMMGDecorator.java +++ b/common/src/main/java/com/yunbao/common/sud/decorator/SudFSMMGDecorator.java @@ -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); @@ -244,11 +245,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); diff --git a/common/src/main/java/com/yunbao/common/sud/decorator/SudFSTAPPDecorator.java b/common/src/main/java/com/yunbao/common/sud/decorator/SudFSTAPPDecorator.java index b9111098c..eaf54acb8 100644 --- a/common/src/main/java/com/yunbao/common/sud/decorator/SudFSTAPPDecorator.java +++ b/common/src/main/java/com/yunbao/common/sud/decorator/SudFSTAPPDecorator.java @@ -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 = reportGameInfoExtras; +// state.reportGameInfoKey = reportGameInfoKey; iSudFSTAPP.notifyStateChange(SudMGPAPPState.APP_COMMON_SELF_PLAYING, SudJsonUtils.toJson(state), null); } } diff --git a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java index 237fb0490..1fcb860c1 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java @@ -25,6 +25,7 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.sud.QuickStartGameViewModel; import com.yunbao.common.sud.model.GameConfigModel; +import com.yunbao.common.sud.state.SudMGPMGState; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -32,6 +33,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; /** @@ -47,6 +50,7 @@ public class LiveSudGamePopup extends BottomPopupView { private TextView gameTitle, roomName, roomNumber; private RoundedImageView mAvatar; + public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) { super(context); mInteractionID = interactionID; @@ -147,6 +151,8 @@ public class LiveSudGamePopup extends BottomPopupView { 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); } @@ -154,9 +160,11 @@ public class LiveSudGamePopup extends BottomPopupView { private void initDate() { } - public void BusGetOff(){ + + public void BusGetOff() { Bus.getOff(this); } + @Override public void dismiss() { @@ -178,34 +186,59 @@ public class LiveSudGamePopup extends BottomPopupView { @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() { - @Override - public void onSuccess(CheckRemainingBalance data) { - if (data.getGoldenBeanRemainingBalance() == 1) { - gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1); - } else { + 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() { + @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 "); + } + + } + } + + @Override + public void onError(String error) { if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { ToastUtil.show("金豆不够 "); } else { ToastUtil.show("Insufficient 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() { + @Override + public void onSuccess(CheckRemainingBalance data) { + if (data.getStatus()==1){ + gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true); + }else { - @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) { + ToastUtil.show(error); + } + }); + break; } + } } diff --git a/common/src/main/res/drawable/bg_live_sud_random_home.xml b/common/src/main/res/drawable/bg_live_sud_random_home.xml new file mode 100644 index 000000000..12f305b10 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_random_home.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_create_sud_game.xml b/common/src/main/res/layout/dialog_create_sud_game.xml index fa9eccf57..894d1f93c 100644 --- a/common/src/main/res/layout/dialog_create_sud_game.xml +++ b/common/src/main/res/layout/dialog_create_sud_game.xml @@ -40,45 +40,66 @@ + android:layout_marginStart="72dp" + android:layout_marginTop="30dp" + android:orientation="vertical"> - + + + + + + + + android:gravity="center_vertical" + android:orientation="vertical"> @@ -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,52 @@ + android:gravity="center_vertical" + android:orientation="vertical"> - + + + + + + + + + + android:layout_marginStart="72dp" + android:layout_marginTop="30dp" + android:orientation="vertical"> - + + + + + + + + android:gravity="center_vertical" + android:orientation="vertical"> + android:gravity="center_vertical" + android:orientation="vertical"> - + + + + + + + + + + Exiting the live room will synchronize with exiting the game room. \ n Do you want to continue IN GAME minimize + 随机 diff --git a/config.gradle b/config.gradle index a4c1d2a21..808d3435f 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : " https://ceshi.yaoulive.com", + serverHost : " https://ceshi.yaoulive.com",