diff --git a/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java b/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java index c75f70f05..9d1f676d1 100644 --- a/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java @@ -1,5 +1,7 @@ package com.yunbao.common.bean; +import android.text.TextUtils; + import com.google.gson.annotations.SerializedName; import java.util.ArrayList; @@ -198,8 +200,13 @@ public class SudRoomListModel extends BaseModel { } public String getTotal() { - int obT = Integer.parseInt(obTotal); - int playerO = Integer.parseInt(playerTotal); - return String.valueOf(obT + playerO); + if (TextUtils.isEmpty(obTotal)&&TextUtils.isEmpty(playerTotal)){ + return "0"; + }else { + int obT = Integer.parseInt(obTotal); + int playerO = Integer.parseInt(playerTotal); + return String.valueOf(obT + playerO); + } + } } 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 95f7d825f..d12f85fff 100644 --- a/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/CreateSudGamePopup.java @@ -1,8 +1,12 @@ package com.yunbao.common.dialog; +import static androidx.core.content.ContextCompat.getSystemService; + import android.content.Context; import android.content.Intent; +import android.os.Handler; import android.text.TextUtils; +import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.TextView; @@ -83,13 +87,35 @@ public class CreateSudGamePopup extends BottomPopupView { ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - XPopup.Builder builder = new XPopup.Builder(getContext()).atView(createGameType); - builder.hasShadowBg(false) - .isDestroyOnDismiss(true) - .isLightStatusBar(false) - .popupPosition(PopupPosition.Bottom) - .asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID)) - .show(); + if (hasMoveUp){ + InputMethodManager imm = getSystemService(getContext(), InputMethodManager.class); + if (imm != null) { + imm.hideSoftInputFromWindow(roomName.getWindowToken(), 0); + imm.hideSoftInputFromWindow(gameSill.getWindowToken(), 0); + } + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + XPopup.Builder builder = new XPopup.Builder(getContext()).atView(createGameType); + builder.hasShadowBg(false) + .isDestroyOnDismiss(true) + .isLightStatusBar(false) + .popupPosition(PopupPosition.Bottom) + .asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID)) + .show(); + } + },1000); + }else { + XPopup.Builder builder = new XPopup.Builder(getContext()).atView(createGameType); + builder.hasShadowBg(false) + .isDestroyOnDismiss(true) + .isLightStatusBar(false) + .popupPosition(PopupPosition.Bottom) + .asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID)) + .show(); + } + + } }); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_back), diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java index d0d4c9bd3..da4000e8e 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -30,7 +30,9 @@ import com.yunbao.common.event.SudGameListSillEvent; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; 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.weight.ViewClicksAntiShake; @@ -39,6 +41,7 @@ import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.List; +import java.util.Locale; public class SudGameListPopup extends BottomPopupView { private long interactionID = 0; @@ -110,7 +113,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, p - 1, callback); } @Override @@ -170,21 +173,13 @@ public class SudGameListPopup extends BottomPopupView { @Override public void onError(String error) { - + if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("房间不存在"); + } else { + ToastUtil.show("The room does not exist"); + } } }); -// List sudRoomListModels = sudGameListAdapter.getList(); -// if (sudRoomListModels.size() > 1) { -// int random = RandomUtil.nextInt(sudRoomListModels.size() - 1); -// CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); -// createSudRoomModel.setSudGameId(sudRoomListModels.get(random).getSudGameId()); -// createSudRoomModel.setSudGameRoomId(sudRoomListModels.get(random).getSudGameRoomId()); -// createSudRoomModel.setAvatar(sudRoomListModels.get(random).getAvatar()); -// createSudRoomModel.setRoomName(sudRoomListModels.get(random).getRoomName()); -// createSudRoomModel.setSudGameName(sudRoomListModels.get(random).getSudGameName()); - -// } -// } }); ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.search), new ViewClicksAntiShake.ViewClicksCallBack() { @@ -252,7 +247,7 @@ public class SudGameListPopup extends BottomPopupView { public void onViewClicks() { new XPopup.Builder(getContext()) .enableDrag(false) - .moveUpToKeyboard(false) + .moveUpToKeyboard(true) .asCustom(new CreateSudGamePopup(getContext(), customSidebarChildModels, false)) .show(); @@ -321,6 +316,7 @@ public class SudGameListPopup extends BottomPopupView { public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) { dialog.dismiss(); } + @Subscribe(threadMode = ThreadMode.MAIN) public void onSudGameListRefreshEvent(SudGameListRefreshEvent event) { mRefreshView.initData(); diff --git a/common/src/main/java/com/yunbao/common/event/LiveOpenSudRoomEvent.java b/common/src/main/java/com/yunbao/common/event/LiveOpenSudRoomEvent.java new file mode 100644 index 000000000..936c57317 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/event/LiveOpenSudRoomEvent.java @@ -0,0 +1,17 @@ +package com.yunbao.common.event; + +import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.CreateSudRoomModel; + +public class LiveOpenSudRoomEvent extends BaseModel { + private CreateSudRoomModel createSudRoomModel = null; + + public CreateSudRoomModel getCreateSudRoomModel() { + return createSudRoomModel; + } + + public LiveOpenSudRoomEvent setCreateSudRoomModel(CreateSudRoomModel createSudRoomModel) { + this.createSudRoomModel = createSudRoomModel; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java b/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java index 3074178c6..3092a1341 100644 --- a/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java @@ -1,6 +1,7 @@ package com.yunbao.common.views; import android.content.Intent; +import android.os.Handler; import android.text.TextUtils; import android.view.View; import android.widget.ImageView; @@ -18,6 +19,7 @@ import com.yunbao.common.activity.SudGameActivity; 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.SudGameListDissMissEvent; import com.yunbao.common.event.SudGameListRefreshEvent; import com.yunbao.common.glide.ImgLoader; @@ -33,13 +35,11 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; import java.util.Locale; -import pl.droidsonroids.gif.GifImageView; - public class SudGameListViewHolder extends RecyclerView.ViewHolder { private RoundedImageView mAvatar; private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber; private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5; - private GifImageView gifImageView; + private ImageView gifImageView; private ImageView sex, game_icon; @@ -77,31 +77,6 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { } else if (TextUtils.equals(model.getSex(), "2")) { ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_woman, sex); } -// List playerObjects = model.getPlayerObjects(); -// for (int i = 0; i < playerObjects.size(); i++) { -// switch (i) { -// case 0: -// avatarList1.setVisibility(View.VISIBLE); -// ImgLoader.display(itemView.getContext(), playerObjects.get(i).getAvatar(), avatarList1); -// break; -// case 1: -// avatarList2.setVisibility(View.VISIBLE); -// ImgLoader.display(itemView.getContext(), playerObjects.get(i).getAvatar(), avatarList2); -// break; -// case 2: -// avatarList3.setVisibility(View.VISIBLE); -// ImgLoader.display(itemView.getContext(), playerObjects.get(i).getAvatar(), avatarList3); -// break; -// case 3: -// avatarList4.setVisibility(View.VISIBLE); -// ImgLoader.display(itemView.getContext(), playerObjects.get(i).getAvatar(), avatarList4); -// break; -// case 4: -// avatarList5.setVisibility(View.VISIBLE); -// ImgLoader.display(itemView.getContext(), playerObjects.get(i).getAvatar(), avatarList5); -// break; -// } -// } ImgLoader.display(itemView.getContext(), model.getSudgameicon(), game_icon); ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.layout), new ViewClicksAntiShake.ViewClicksCallBack() { @Override @@ -129,28 +104,59 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel)); itemView.getContext().startActivity(intent); } else { - LiveHttpUtil.getLiveInfo(model.getLiveUid() + "", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0 && info.length > 0) { - LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - new LiveRoomCheckLivePresenter(itemView.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); - IMLoginManager.get(itemView.getContext()).setSudGame(new Gson().toJson(createSudRoomModel)); - } + String yes = "是"; + if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + yes = "是"; + } else { + yes = "Yes"; + } + new XPopup.Builder(itemView.getContext()) + .asCustom(new HintCustomPopup(itemView.getContext(), + itemView.getContext().getString(R.string.interactive_game_search_room_currently_live), + itemView.getContext().getString(R.string.interactive_game_search_room_broadcast_room)) + .setLiveOpenOk(yes) + .setLiveOpenCancel(itemView.getContext().getString(R.string.interactive_game_search_room_bhe_game)) + .setCallBack(new HintCustomPopup.HintCustomCallBack() { + @Override + public void onSure() { + LiveHttpUtil.getLiveInfo(model.getLiveUid() + "", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + new LiveRoomCheckLivePresenter(itemView.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { + @Override + public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { + RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + Bus.get().post(new LiveOpenSudRoomEvent().setCreateSudRoomModel(createSudRoomModel)); + } + },1500); + } - @Override - public void onCheckError(String contextError) { + @Override + public void onCheckError(String contextError) { + + } + }); + } else { + RouteUtil.forwardUserHome(itemView.getContext(), model.getLiveUid(), 0); + } + } + }); + } + + @Override + public void onCancel() { + + Intent intent = new Intent(itemView.getContext(), SudGameActivity.class); + intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel)); + itemView.getContext().startActivity(intent); + } + })).show(); - } - }); - } else { - RouteUtil.forwardUserHome(itemView.getContext(), model.getLiveUid(), 0); - } - } - }); } } else { 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 62110e00f..1e5c433b9 100644 --- a/common/src/main/res/layout/dialog_create_sud_game.xml +++ b/common/src/main/res/layout/dialog_create_sud_game.xml @@ -45,8 +45,9 @@ android:gravity="center_vertical"> @@ -73,8 +74,9 @@ android:gravity="center_vertical"> @@ -100,8 +102,9 @@ android:gravity="center_vertical"> @@ -111,11 +114,12 @@ android:layout_width="175dp" android:layout_height="32dp" android:background="@drawable/bg_live_sud_list_input" + android:hint="@string/interactive_game_create_gold_bean_quantity" + android:inputType="numberDecimal" android:paddingStart="12dp" android:paddingTop="9dp" + android:ellipsize="end" android:paddingBottom="9dp" - android:inputType="numberDecimal" - android:hint="@string/interactive_game_create_gold_bean_quantity" android:textColor="@color/white" android:textColorHint="#FFFFFF" android:textSize="10sp" /> diff --git a/common/src/main/res/layout/item_home_sud_game_list.xml b/common/src/main/res/layout/item_home_sud_game_list.xml index 7621f7cee..988a6487b 100644 --- a/common/src/main/res/layout/item_home_sud_game_list.xml +++ b/common/src/main/res/layout/item_home_sud_game_list.xml @@ -23,14 +23,14 @@ android:scaleType="centerCrop" app:riv_oval="true" /> - diff --git a/common/src/main/res/mipmap-b+en+us/icon_user_game_living.png b/common/src/main/res/mipmap-b+en+us/icon_user_game_living.png new file mode 100644 index 000000000..f4e9825c5 Binary files /dev/null and b/common/src/main/res/mipmap-b+en+us/icon_user_game_living.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_user_game_living.png b/common/src/main/res/mipmap-xxhdpi/icon_user_game_living.png new file mode 100644 index 000000000..27922f6ce Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_user_game_living.png differ diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index b18a5216d..3ad130b22 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -258,7 +258,7 @@ shopmall Recomm CSD - anchor + Anchor Live broadcast Room type Share to @@ -609,7 +609,7 @@ Release only Save and publish Re shooting - Sign out + Exit Long press to add special effects Publishing failure You don\'t have a video yet @@ -1339,12 +1339,15 @@ Limited ride And limited avatar frame 1K-2KGolden Bean 2K-5KGolden Bean 5 K or more gold beans - player + User In a team of %s people, let\'s play together~ %s people online Search for room Search History Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for. No search results have been found + The anchor is currently live streaming + Whether to enter the live broadcast room + No,only enter the game diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index f8f068fe6..12de0297d 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1342,4 +1342,7 @@ 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 不存在此房间 + 主播正在直播中 + 是否同步進入主播直播間 + 否,僅進入遊戲 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index cfbf450c0..d7a2994fa 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1341,4 +1341,7 @@ 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 不存在此房间 + 主播正在直播中 + 是否同步進入主播直播間 + 否,僅進入遊戲 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 4789631f8..b9e4ad757 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1342,5 +1342,8 @@ 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 不存在此房间 + 主播正在直播中 + 是否同步進入主播直播間 + 否,僅進入遊戲 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 641ff6ab3..ea04695e9 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -258,7 +258,7 @@ shopmall Recomm CSD - anchor + Anchor Live broadcast Room type Share to @@ -609,7 +609,7 @@ Release only Save and publish Re shooting - Sign out + Exit Long press to add special effects Publishing failure You don\'t have a video yet @@ -1341,11 +1341,14 @@ Limited ride And limited avatar frame 1K-2KGolden Bean 2K-5KGolden Bean 5 K or more gold beans - player + User In a team of %s people, let\'s play together~ %s people online Search for room Search History Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for. No search results have been found + The anchor is currently live streaming + Whether to enter the live broadcast room + No,only enter the game diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 18f500296..4284be575 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -66,6 +66,7 @@ import com.yunbao.common.event.FollowEvent; import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.event.LiveErrorEvent; +import com.yunbao.common.event.LiveOpenSudRoomEvent; import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent; import com.yunbao.common.glide.ImgLoader; @@ -92,7 +93,6 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.CustomDrawerPopupView; -import com.yunbao.common.views.LiveSudGamePopup; import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.weight.VerticalViewPager; import com.yunbao.live.R; @@ -990,7 +990,8 @@ public class LiveAudienceActivity extends LiveActivity { .enableDrag(false) // .dismissOnTouchOutside(false) // .dismissOnBackPressed(false) - .asCustom(new SudGameListPopup(mContext, interactionID, child,mLiveUid)) + .moveUpToKeyboard(false) + .asCustom(new SudGameListPopup(mContext, interactionID, child, mLiveUid)) .show(); } @@ -1634,6 +1635,13 @@ public class LiveAudienceActivity extends LiveActivity { }); } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onLiveOpenSudRoomEvent(LiveOpenSudRoomEvent liveOpenSudRoomEvent) { + if (manager != null) { + manager.setCreateSudRoomModel(liveOpenSudRoomEvent.getCreateSudRoomModel()); + } + } + @Subscribe(threadMode = ThreadMode.MAIN) public void onNewRoleCustomDrawerPopupEvent(NewRoleCustomDrawerPopupEvent event) { //是否关闭弹窗 @@ -1677,13 +1685,14 @@ public class LiveAudienceActivity extends LiveActivity { } } //互动游戏 - if (event.isInteraction()){ + if (event.isInteraction()) { // callBack.interaction(event.getInteractionID()); new XPopup.Builder(mContext) .enableDrag(false) // .dismissOnTouchOutside(false) // .dismissOnBackPressed(false) - .asCustom(new SudGameListPopup(mContext, event.getInteractionID(), event.getChild(),mLiveUid)) + .moveUpToKeyboard(false) + .asCustom(new SudGameListPopup(mContext, event.getInteractionID(), event.getChild(), mLiveUid)) .show(); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java index 12bfb2a97..803ff5c15 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java @@ -216,6 +216,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements if (datum.getType().equals("6")) { new XPopup.Builder(mContext) .enableDrag(false) + .moveUpToKeyboard(false) // .dismissOnTouchOutside(false) // .dismissOnBackPressed(false) .asCustom(new SudGameListPopup(mContext, 0, datum.getChild(), liveUid)) diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index a63eb679b..11b15b2ec 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -26,7 +26,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; -import com.google.gson.Gson; import com.lxj.xpopup.XPopup; import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.permission.PermissionUtils; @@ -209,6 +208,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe return this; } + private CreateSudRoomModel createSudRoomModel = null; + + public void setCreateSudRoomModel(CreateSudRoomModel createSudRoomModel) { + this.createSudRoomModel = createSudRoomModel; + } + public PortraitLiveManager(Activity context, Intent intent) { this.mContext = context; this.mIntent = intent; @@ -1117,15 +1122,18 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } }, 3000); } + if (createSudRoomModel != null) { + new XPopup.Builder(mContext) + .enableDrag(false) + .dismissOnTouchOutside(false) + .dismissOnBackPressed(false) + .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) + .show(); + } // String jsonCreateSudRoom = IMLoginManager.get(mContext).getSudGame(); // if (!TextUtils.isEmpty(jsonCreateSudRoom)) { // CreateSudRoomModel createSudRoomModel = new Gson().fromJson(jsonCreateSudRoom, CreateSudRoomModel.class); -// new XPopup.Builder(mContext) -// .enableDrag(false) -// .dismissOnTouchOutside(false) -// .dismissOnBackPressed(false) -// .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) -// .show(); + // } } else { enterRoomLeaveHandler.postDelayed(enterRoomLeaveRunnable, 200);