修改游戏问题

This commit is contained in:
18401019693 2023-10-06 13:45:47 +08:00
parent 2d7684a5c8
commit 12482b6624
19 changed files with 189 additions and 100 deletions

View File

@ -1,5 +1,7 @@
package com.yunbao.common.bean; package com.yunbao.common.bean;
import android.text.TextUtils;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import java.util.ArrayList; import java.util.ArrayList;
@ -198,8 +200,13 @@ public class SudRoomListModel extends BaseModel {
} }
public String getTotal() { public String getTotal() {
if (TextUtils.isEmpty(obTotal)&&TextUtils.isEmpty(playerTotal)){
return "0";
}else {
int obT = Integer.parseInt(obTotal); int obT = Integer.parseInt(obTotal);
int playerO = Integer.parseInt(playerTotal); int playerO = Integer.parseInt(playerTotal);
return String.valueOf(obT + playerO); return String.valueOf(obT + playerO);
} }
}
} }

View File

@ -1,8 +1,12 @@
package com.yunbao.common.dialog; package com.yunbao.common.dialog;
import static androidx.core.content.ContextCompat.getSystemService;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Handler;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
@ -83,6 +87,15 @@ public class CreateSudGamePopup extends BottomPopupView {
ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(createGameType, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
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); XPopup.Builder builder = new XPopup.Builder(getContext()).atView(createGameType);
builder.hasShadowBg(false) builder.hasShadowBg(false)
.isDestroyOnDismiss(true) .isDestroyOnDismiss(true)
@ -90,6 +103,19 @@ public class CreateSudGamePopup extends BottomPopupView {
.popupPosition(PopupPosition.Bottom) .popupPosition(PopupPosition.Bottom)
.asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID)) .asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID))
.show(); .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), ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_back),

View File

@ -30,7 +30,9 @@ import com.yunbao.common.event.SudGameListSillEvent;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.LiveSudGamePopup; import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
@ -39,6 +41,7 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale;
public class SudGameListPopup extends BottomPopupView { public class SudGameListPopup extends BottomPopupView {
private long interactionID = 0; private long interactionID = 0;
@ -170,21 +173,13 @@ public class SudGameListPopup extends BottomPopupView {
@Override @Override
public void onError(String error) { public void onError(String error) {
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("房间不存在");
} else {
ToastUtil.show("The room does not exist");
}
} }
}); });
// List<SudRoomListModel> 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() { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.search), new ViewClicksAntiShake.ViewClicksCallBack() {
@ -252,7 +247,7 @@ public class SudGameListPopup extends BottomPopupView {
public void onViewClicks() { public void onViewClicks() {
new XPopup.Builder(getContext()) new XPopup.Builder(getContext())
.enableDrag(false) .enableDrag(false)
.moveUpToKeyboard(false) .moveUpToKeyboard(true)
.asCustom(new CreateSudGamePopup(getContext(), customSidebarChildModels, false)) .asCustom(new CreateSudGamePopup(getContext(), customSidebarChildModels, false))
.show(); .show();
@ -321,6 +316,7 @@ public class SudGameListPopup extends BottomPopupView {
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) { public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
dialog.dismiss(); dialog.dismiss();
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameListRefreshEvent(SudGameListRefreshEvent event) { public void onSudGameListRefreshEvent(SudGameListRefreshEvent event) {
mRefreshView.initData(); mRefreshView.initData();

View File

@ -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;
}
}

View File

@ -1,6 +1,7 @@
package com.yunbao.common.views; package com.yunbao.common.views;
import android.content.Intent; import android.content.Intent;
import android.os.Handler;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.ImageView; 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.CreateSudRoomModel;
import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.SudRoomListModel; import com.yunbao.common.bean.SudRoomListModel;
import com.yunbao.common.event.LiveOpenSudRoomEvent;
import com.yunbao.common.event.SudGameListDissMissEvent; import com.yunbao.common.event.SudGameListDissMissEvent;
import com.yunbao.common.event.SudGameListRefreshEvent; import com.yunbao.common.event.SudGameListRefreshEvent;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
@ -33,13 +35,11 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
import java.util.Locale; import java.util.Locale;
import pl.droidsonroids.gif.GifImageView;
public class SudGameListViewHolder extends RecyclerView.ViewHolder { public class SudGameListViewHolder extends RecyclerView.ViewHolder {
private RoundedImageView mAvatar; private RoundedImageView mAvatar;
private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber; private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber;
private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5; private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5;
private GifImageView gifImageView; private ImageView gifImageView;
private ImageView sex, game_icon; private ImageView sex, game_icon;
@ -77,31 +77,6 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
} else if (TextUtils.equals(model.getSex(), "2")) { } else if (TextUtils.equals(model.getSex(), "2")) {
ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_woman, sex); ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_woman, sex);
} }
// List<playerObject> 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); ImgLoader.display(itemView.getContext(), model.getSudgameicon(), game_icon);
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.layout), new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.layout), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
@ -129,6 +104,21 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel)); intent.putExtra("CreateSudRoom", new Gson().toJson(createSudRoomModel));
itemView.getContext().startActivity(intent); itemView.getContext().startActivity(intent);
} else { } else {
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() { LiveHttpUtil.getLiveInfo(model.getLiveUid() + "", new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
@ -138,7 +128,12 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
@Override @Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
IMLoginManager.get(itemView.getContext()).setSudGame(new Gson().toJson(createSudRoomModel)); new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Bus.get().post(new LiveOpenSudRoomEvent().setCreateSudRoomModel(createSudRoomModel));
}
},1500);
} }
@Override @Override
@ -153,6 +148,17 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder {
}); });
} }
@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 { } else {
new XPopup.Builder(itemView.getContext()) new XPopup.Builder(itemView.getContext())
.enableDrag(false) .enableDrag(false)

View File

@ -45,8 +45,9 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/interactive_game_create_room_name" android:text="@string/interactive_game_create_room_name"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
@ -73,8 +74,9 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/interactive_game_create_game_type" android:text="@string/interactive_game_create_game_type"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
@ -100,8 +102,9 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="end"
android:text="@string/interactive_game_create_game_sill" android:text="@string/interactive_game_create_game_sill"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
@ -111,11 +114,12 @@
android:layout_width="175dp" android:layout_width="175dp"
android:layout_height="32dp" android:layout_height="32dp"
android:background="@drawable/bg_live_sud_list_input" android:background="@drawable/bg_live_sud_list_input"
android:hint="@string/interactive_game_create_gold_bean_quantity"
android:inputType="numberDecimal"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingTop="9dp" android:paddingTop="9dp"
android:ellipsize="end"
android:paddingBottom="9dp" android:paddingBottom="9dp"
android:inputType="numberDecimal"
android:hint="@string/interactive_game_create_gold_bean_quantity"
android:textColor="@color/white" android:textColor="@color/white"
android:textColorHint="#FFFFFF" android:textColorHint="#FFFFFF"
android:textSize="10sp" /> android:textSize="10sp" />

View File

@ -23,14 +23,14 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:riv_oval="true" /> app:riv_oval="true" />
<pl.droidsonroids.gif.GifImageView <ImageView
android:id="@+id/btn_live" android:id="@+id/btn_live"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="14dp" android:layout_height="14dp"
android:layout_gravity="bottom|center_horizontal" android:layout_gravity="bottom|center_horizontal"
android:layout_marginEnd="3dp" android:layout_marginEnd="3dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:src="@mipmap/icon_user_home_living" android:src="@mipmap/icon_user_game_living"
android:visibility="visible" /> android:visibility="visible" />
<ImageView <ImageView

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="80dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_live_sud_list_select" android:background="@drawable/bg_live_sud_list_select"
android:orientation="vertical" android:orientation="vertical"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="150dp"
android:layout_height="26dp"> android:layout_height="26dp">
<TextView <TextView
@ -8,10 +8,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_live_sud_list_select_item" android:background="@drawable/bg_live_sud_list_select_item"
android:clickable="true"
android:gravity="center" android:gravity="center"
android:padding="3dp" android:padding="3dp"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:clickable="true"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -258,7 +258,7 @@
<string name="shopmall">shopmall</string> <string name="shopmall">shopmall</string>
<string name="recomment">Recomm</string> <string name="recomment">Recomm</string>
<string name="cust_server">CSD</string> <string name="cust_server">CSD</string>
<string name="live_anchor">anchor</string> <string name="live_anchor">Anchor</string>
<string name="live_start">Live broadcast</string> <string name="live_start">Live broadcast</string>
<string name="live_room_type">Room type</string> <string name="live_room_type">Room type</string>
<string name="live_share_to">Share to</string> <string name="live_share_to">Share to</string>
@ -609,7 +609,7 @@
<string name="video_save_pub">Release only</string> <string name="video_save_pub">Release only</string>
<string name="video_save_save_and_pub">Save and publish</string> <string name="video_save_save_and_pub">Save and publish</string>
<string name="video_re_record">Re shooting</string> <string name="video_re_record">Re shooting</string>
<string name="video_exit">Sign out</string> <string name="video_exit">Exit</string>
<string name="video_edit_cut_tip_2">Long press to add special effects</string> <string name="video_edit_cut_tip_2">Long press to add special effects</string>
<string name="video_pub_failed">Publishing failure</string> <string name="video_pub_failed">Publishing failure</string>
<string name="video_no_video_home_1">You don\'t have a video yet</string> <string name="video_no_video_home_1">You don\'t have a video yet</string>
@ -1339,12 +1339,15 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_create_1_2">1K-2KGolden Bean</string> <string name="interactive_game_create_1_2">1K-2KGolden Bean</string>
<string name="interactive_game_create_2_5">2K-5KGolden Bean</string> <string name="interactive_game_create_2_5">2K-5KGolden Bean</string>
<string name="interactive_game_create_5">5 K or more gold beans</string> <string name="interactive_game_create_5">5 K or more gold beans</string>
<string name="interactive_game_player">player</string> <string name="interactive_game_player">User</string>
<string name="interactive_game_player_we_are">In a team of %s people, let\'s play together~</string> <string name="interactive_game_player_we_are">In a team of %s people, let\'s play together~</string>
<string name="interactive_game_player_we_are_2">%s people online</string> <string name="interactive_game_player_we_are_2">%s people online</string>
<string name="interactive_game_search_room">Search for room</string> <string name="interactive_game_search_room">Search for room</string>
<string name="interactive_game_search_history">Search History</string> <string name="interactive_game_search_history">Search History</string>
<string name="interactive_game_search_room_name_input">Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for.</string> <string name="interactive_game_search_room_name_input">Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for.</string>
<string name="interactive_game_search_room_have_been_found">No search results have been found</string> <string name="interactive_game_search_room_have_been_found">No search results have been found</string>
<string name="interactive_game_search_room_currently_live">The anchor is currently live streaming</string>
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
<string name="interactive_game_search_room_bhe_game">Noonly enter the game</string>
</resources> </resources>

View File

@ -1342,4 +1342,7 @@
<string name="interactive_game_search_history">搜索历史</string> <string name="interactive_game_search_history">搜索历史</string>
<string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string> <string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string>
<string name="interactive_game_search_room_have_been_found">不存在此房间</string> <string name="interactive_game_search_room_have_been_found">不存在此房间</string>
<string name="interactive_game_search_room_currently_live">主播正在直播中</string>
<string name="interactive_game_search_room_broadcast_room">是否同步進入主播直播間</string>
<string name="interactive_game_search_room_bhe_game">否,僅進入遊戲</string>
</resources> </resources>

View File

@ -1341,4 +1341,7 @@
<string name="interactive_game_search_history">搜索历史</string> <string name="interactive_game_search_history">搜索历史</string>
<string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string> <string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string>
<string name="interactive_game_search_room_have_been_found">不存在此房间</string> <string name="interactive_game_search_room_have_been_found">不存在此房间</string>
<string name="interactive_game_search_room_currently_live">主播正在直播中</string>
<string name="interactive_game_search_room_broadcast_room">是否同步進入主播直播間</string>
<string name="interactive_game_search_room_bhe_game">否,僅進入遊戲</string>
</resources> </resources>

View File

@ -1342,5 +1342,8 @@
<string name="interactive_game_search_history">搜索历史</string> <string name="interactive_game_search_history">搜索历史</string>
<string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string> <string name="interactive_game_search_room_name_input">請輸入您要搜索的房主昵稱、房主ID或房間名</string>
<string name="interactive_game_search_room_have_been_found">不存在此房间</string> <string name="interactive_game_search_room_have_been_found">不存在此房间</string>
<string name="interactive_game_search_room_currently_live">主播正在直播中</string>
<string name="interactive_game_search_room_broadcast_room">是否同步進入主播直播間</string>
<string name="interactive_game_search_room_bhe_game">否,僅進入遊戲</string>
</resources> </resources>

View File

@ -258,7 +258,7 @@
<string name="shopmall">shopmall</string> <string name="shopmall">shopmall</string>
<string name="recomment">Recomm</string> <string name="recomment">Recomm</string>
<string name="cust_server">CSD</string> <string name="cust_server">CSD</string>
<string name="live_anchor">anchor</string> <string name="live_anchor">Anchor</string>
<string name="live_start">Live broadcast</string> <string name="live_start">Live broadcast</string>
<string name="live_room_type">Room type</string> <string name="live_room_type">Room type</string>
<string name="live_share_to">Share to</string> <string name="live_share_to">Share to</string>
@ -609,7 +609,7 @@
<string name="video_save_pub">Release only</string> <string name="video_save_pub">Release only</string>
<string name="video_save_save_and_pub">Save and publish</string> <string name="video_save_save_and_pub">Save and publish</string>
<string name="video_re_record">Re shooting</string> <string name="video_re_record">Re shooting</string>
<string name="video_exit">Sign out</string> <string name="video_exit">Exit</string>
<string name="video_edit_cut_tip_2">Long press to add special effects</string> <string name="video_edit_cut_tip_2">Long press to add special effects</string>
<string name="video_pub_failed">Publishing failure</string> <string name="video_pub_failed">Publishing failure</string>
<string name="video_no_video_home_1">You don\'t have a video yet</string> <string name="video_no_video_home_1">You don\'t have a video yet</string>
@ -1341,11 +1341,14 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_create_1_2">1K-2KGolden Bean</string> <string name="interactive_game_create_1_2">1K-2KGolden Bean</string>
<string name="interactive_game_create_2_5">2K-5KGolden Bean</string> <string name="interactive_game_create_2_5">2K-5KGolden Bean</string>
<string name="interactive_game_create_5">5 K or more gold beans</string> <string name="interactive_game_create_5">5 K or more gold beans</string>
<string name="interactive_game_player">player</string> <string name="interactive_game_player">User</string>
<string name="interactive_game_player_we_are">In a team of %s people, let\'s play together~</string> <string name="interactive_game_player_we_are">In a team of %s people, let\'s play together~</string>
<string name="interactive_game_player_we_are_2">%s people online</string> <string name="interactive_game_player_we_are_2">%s people online</string>
<string name="interactive_game_search_room">Search for room</string> <string name="interactive_game_search_room">Search for room</string>
<string name="interactive_game_search_history">Search History</string> <string name="interactive_game_search_history">Search History</string>
<string name="interactive_game_search_room_name_input">Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for.</string> <string name="interactive_game_search_room_name_input">Search for room: Please enter the owner\'s name, owner ID, or room name you want to search for.</string>
<string name="interactive_game_search_room_have_been_found">No search results have been found</string> <string name="interactive_game_search_room_have_been_found">No search results have been found</string>
<string name="interactive_game_search_room_currently_live">The anchor is currently live streaming</string>
<string name="interactive_game_search_room_broadcast_room">Whether to enter the live broadcast room</string>
<string name="interactive_game_search_room_bhe_game">Noonly enter the game</string>
</resources> </resources>

View File

@ -66,6 +66,7 @@ import com.yunbao.common.event.FollowEvent;
import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.GiftWallIlluminateEvent;
import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveErrorEvent; import com.yunbao.common.event.LiveErrorEvent;
import com.yunbao.common.event.LiveOpenSudRoomEvent;
import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent; import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
import com.yunbao.common.glide.ImgLoader; 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.StringUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.CustomDrawerPopupView; import com.yunbao.common.views.CustomDrawerPopupView;
import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.floatingview.APPEasyFloat;
import com.yunbao.common.views.weight.VerticalViewPager; import com.yunbao.common.views.weight.VerticalViewPager;
import com.yunbao.live.R; import com.yunbao.live.R;
@ -990,6 +990,7 @@ public class LiveAudienceActivity extends LiveActivity {
.enableDrag(false) .enableDrag(false)
// .dismissOnTouchOutside(false) // .dismissOnTouchOutside(false)
// .dismissOnBackPressed(false) // .dismissOnBackPressed(false)
.moveUpToKeyboard(false)
.asCustom(new SudGameListPopup(mContext, interactionID, child, mLiveUid)) .asCustom(new SudGameListPopup(mContext, interactionID, child, mLiveUid))
.show(); .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) @Subscribe(threadMode = ThreadMode.MAIN)
public void onNewRoleCustomDrawerPopupEvent(NewRoleCustomDrawerPopupEvent event) { public void onNewRoleCustomDrawerPopupEvent(NewRoleCustomDrawerPopupEvent event) {
//是否关闭弹窗 //是否关闭弹窗
@ -1683,6 +1691,7 @@ public class LiveAudienceActivity extends LiveActivity {
.enableDrag(false) .enableDrag(false)
// .dismissOnTouchOutside(false) // .dismissOnTouchOutside(false)
// .dismissOnBackPressed(false) // .dismissOnBackPressed(false)
.moveUpToKeyboard(false)
.asCustom(new SudGameListPopup(mContext, event.getInteractionID(), event.getChild(), mLiveUid)) .asCustom(new SudGameListPopup(mContext, event.getInteractionID(), event.getChild(), mLiveUid))
.show(); .show();

View File

@ -216,6 +216,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
if (datum.getType().equals("6")) { if (datum.getType().equals("6")) {
new XPopup.Builder(mContext) new XPopup.Builder(mContext)
.enableDrag(false) .enableDrag(false)
.moveUpToKeyboard(false)
// .dismissOnTouchOutside(false) // .dismissOnTouchOutside(false)
// .dismissOnBackPressed(false) // .dismissOnBackPressed(false)
.asCustom(new SudGameListPopup(mContext, 0, datum.getChild(), liveUid)) .asCustom(new SudGameListPopup(mContext, 0, datum.getChild(), liveUid))

View File

@ -26,7 +26,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils; import com.blankj.utilcode.util.GsonUtils;
import com.google.gson.Gson;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.permission.PermissionUtils; import com.lzf.easyfloat.permission.PermissionUtils;
@ -209,6 +208,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
return this; return this;
} }
private CreateSudRoomModel createSudRoomModel = null;
public void setCreateSudRoomModel(CreateSudRoomModel createSudRoomModel) {
this.createSudRoomModel = createSudRoomModel;
}
public PortraitLiveManager(Activity context, Intent intent) { public PortraitLiveManager(Activity context, Intent intent) {
this.mContext = context; this.mContext = context;
this.mIntent = intent; this.mIntent = intent;
@ -1117,15 +1122,18 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
}, 3000); }, 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(); // String jsonCreateSudRoom = IMLoginManager.get(mContext).getSudGame();
// if (!TextUtils.isEmpty(jsonCreateSudRoom)) { // if (!TextUtils.isEmpty(jsonCreateSudRoom)) {
// CreateSudRoomModel createSudRoomModel = new Gson().fromJson(jsonCreateSudRoom, CreateSudRoomModel.class); // 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 { } else {
enterRoomLeaveHandler.postDelayed(enterRoomLeaveRunnable, 200); enterRoomLeaveHandler.postDelayed(enterRoomLeaveRunnable, 200);