From 12482b66242a3bf288e8a590a169e352dd2547c2 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 6 Oct 2023 13:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=B8=E6=88=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/bean/SudRoomListModel.java | 13 ++- .../common/dialog/CreateSudGamePopup.java | 40 +++++-- .../common/dialog/SudGameListPopup.java | 26 ++--- .../common/event/LiveOpenSudRoomEvent.java | 17 +++ .../common/views/SudGameListViewHolder.java | 102 +++++++++--------- .../res/layout/dialog_create_sud_game.xml | 14 ++- .../res/layout/item_home_sud_game_list.xml | 4 +- .../main/res/layout/view_sud_game_slelect.xml | 2 +- .../res/layout/view_sud_title_select_view.xml | 4 +- .../mipmap-b+en+us/icon_user_game_living.png | Bin 0 -> 2262 bytes .../mipmap-xxhdpi/icon_user_game_living.png | Bin 0 -> 3412 bytes common/src/main/res/values-en-rUS/string.xml | 9 +- common/src/main/res/values-zh-rHK/strings.xml | 3 + common/src/main/res/values-zh-rTW/strings.xml | 3 + common/src/main/res/values-zh/strings.xml | 3 + common/src/main/res/values/strings.xml | 9 +- .../live/activity/LiveAudienceActivity.java | 17 ++- .../dialog/LiveNewFunctionDialogFragment.java | 1 + .../live/views/PortraitLiveManager.java | 22 ++-- 19 files changed, 189 insertions(+), 100 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/event/LiveOpenSudRoomEvent.java create mode 100644 common/src/main/res/mipmap-b+en+us/icon_user_game_living.png create mode 100644 common/src/main/res/mipmap-xxhdpi/icon_user_game_living.png 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 0000000000000000000000000000000000000000..f4e9825c51eb1dee3c537703bb68b83d2d44d358 GIT binary patch literal 2262 zcmV;{2r2i8P)Px-kV!;ARCr$PoNI7Z)fIrhb?!|<2qYAWLP`j+;VlmlEP+CyR7XlX*3!|jt+f7W zXKW!nhIXVKfw5&MV_c0-e;d9xJ4^SrkWoqJc%$$gu7Jh{~Q0^o*EDVRnDU9 z6?lyCF@xB^sKpY?dB!OOIi@@*5rdV`0T{V?= zMVK6i)G-am!c#+$bZ5HgA$~@8R_WD_DQsM-hz6t^aFxf!9Hu}5Ow+o!YC5t8BnY8e zHjCNMIT3os6O4|G3*4}HT6CXHNaCe4XuxKVV)hc})fs5HGK%?699Spfg_uv{z&aPO zPvXEj7qHzvf!P_)?t<8rxOAqWemP_n^RW+L7FPNqBz-YjxfCjw#U7fI0)ZY7x&+40 z>Rup_8nLXp3$d58o$NtOu@7J&ker63Qg=zj(_&bp&ur-bB6@N@oL(8d;)6YrAqC*1 zphsuI_5CrFvi+JCv&$#22_9fOtQE&t*gkWR%zP+cfL6W`y@4e4M@E;2h10U9;q=SV z-y7p0wWfJ7JADAF1No*0*mi+nYr6kG_u8)d&Orvaz)tx9WG>`3kYs1-L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%DWCls{ zFB5)8JzhGh2Am|IMrVk=LYGjGH33Jy8xM;e6PM#a$moVZPaX?DB&u1(@PNZ#0?9I! z+Q^}rIJ`RxFT7b}cWn|ttF%yp%$6T>;O5gn{YT`(Dj~y@68^A?#6PTZhnPi9E$CUX kA69YP534*D`LN3W00EktHd^-aOaK4?07*qoM6N<$f-v_t)Bpeg literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..27922f6ce888db6e7f9a9b3991f395197e784ac6 GIT binary patch literal 3412 zcmV-a4Xg5rP)Px?4oO5oRCr$PoO^Ut)tSJ5-?@1Z2_&HqAP^vcf(8hnwF9HnDnfvEgf&)ZIu^R7 zvsNF{PN!Wu3&*979mQpxnLfv^S_3L-i`Dw73XCYEJ|HDL5-?Oi#Da#PF@PbDyT4ic z>=Sa5+?(8+W^7z${{w5^^Z54n`=0xp93dEbgbdDbwZgRsMIz*?w*K1x??ZRuA{U)F%6 zK(v{SVk$Wy!jS#~qc7uvAS@me-D3-q{_%0pfUO?I?4qC7$AMNLqnMrjz&=L25L3}d zfk_&eCXl~CovpE>C)Wtaot~WU4RV5;lYhYiI-e@$k9`oBRo19Gz`PG9)zkauv6F0u?}`G4Kdr30A|;jw+hL- z89jO{9KAhxXx>0b`Bc}mqxDE(1(*i(^}mJI@Dg*;3N0tVoNoWC1vYt$4@WDf`@hM^ ze}VkFL7M{0vox*sMZwC|Pz6nILDQen(=WsEQfHtRb~46kfz5c+0jn6-%fMbs0+|P+g~#!0EVKwr$a;_sz~-_Xe1lFOr+^e)HEQ2 z=0N^xbnh&v-{IDjJr7AAgT8xjdsr4+cl)d@AQv5Sz{(3CrJLp2`z07|#k`v6p@FN< z4gq^vlD8f&15$FjFj<3ST?qxhg4$B_tsB5Qr;8O^4}0JDMt@jkS`kwsNMX6%-bQ!K zbaMJ(JOv8wK?cr5D`xt0lJ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J@}t(A z%_E`di~~0D8_4AU#=Q17aKb_c8MPRh@iLGO@ACc{v=wpGKn1a`#2uJArC7mMMkfH#&?1@X4NlHNErl8cGo{>;B81u%|Z7C zz--awe8%NEoBvws{2bY7*pxCiC^|OTq9aB@;idYa-M^o|{gr6Z@k|^KyD9|iiI9gS zGvA$ujVeK=mAa6U=&L}su!w$$DgQj2h*2fB-ZLc&Z&m>8#gK>1C`Iy?!MjhmC)(D< z2IRw#%b?~dXsLHsuz7IkTnFrpP)JN5E%}jXUI1*vI2WCIX-M>`I3Bh*1nhSq4@+jg zI}fwKW~@UGtVV6G(`l2p!v#zO-o#ZfY(8dNu>%&*GOdTT0^1z&u$eX_F2?-tXlOj; zLgIPXAs5_@dHE7JvE6qf$^U!g!bj1)0kE?kmVoB1hs_UwJs-!z61YsPLnQiSoIY&Q zD!fUzV5)C{>Yxv^{aG^evF>O+$=ZUilxvU+e~ngt2i^bU#B$ihrI5E2^UCE=`)V66 zf9oh@$rjk`7hN8Cp#!iHS7A2hL8C3_?e6P@&#@KQ3f$i@> zNL&~I`+aW%dpr)X9=dGTrzukKO=SFaZO^G}(zXdWkvCQRr@bwp_L08b&a!V-3R+)@ zR(uUwP9o=Cj}+eF#E3Sc+n1s5JQ*~|id_64GHNNhdnGgn`Kpu9iVT?zBf547mhjaerjYd=di~!~K8M|Wj=GJG{_)q-fZq++)*}_PK{rbZE2V_0vkiv+#(h{NYPeSX535N3hgJSc qyxhYJtr7cS6)*U($~Er8D*p#2tc_GvxOET!0000shopmall 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);