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 eea9adb56..c75f70f05 100644 --- a/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SudRoomListModel.java @@ -38,6 +38,17 @@ public class SudRoomListModel extends BaseModel { private String liveUid; @SerializedName("sex") private String sex; + @SerializedName("sud_game_icon") + private String sudgameicon; + + public String getSudgameicon() { + return sudgameicon; + } + + public SudRoomListModel setSudgameicon(String sudgameicon) { + this.sudgameicon = sudgameicon; + return this; + } public String getLiveUid() { return liveUid; 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 381468303..9c29d84be 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -109,7 +109,7 @@ public class SudGameListPopup extends BottomPopupView { @Override public void loadData(int p, HttpCallback callback) { page = p; - LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, p, callback); + LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, p-1, callback); } @Override diff --git a/common/src/main/java/com/yunbao/common/sud/BaseGameViewModel.java b/common/src/main/java/com/yunbao/common/sud/BaseGameViewModel.java index 2f2933601..1407ebaf2 100644 --- a/common/src/main/java/com/yunbao/common/sud/BaseGameViewModel.java +++ b/common/src/main/java/com/yunbao/common/sud/BaseGameViewModel.java @@ -8,7 +8,6 @@ import android.view.View; import android.view.ViewTreeObserver; import android.widget.Toast; - import com.yunbao.common.sud.decorator.SudFSMMGCache; import com.yunbao.common.sud.decorator.SudFSMMGDecorator; import com.yunbao.common.sud.decorator.SudFSMMGListener; @@ -178,7 +177,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { // region 生命周期相关 - /** 页面销毁的时候调用 */ + /** + * 页面销毁的时候调用 + */ public void onDestroy() { isRunning = false; destroyMG(); @@ -186,7 +187,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { // endregion 生命周期相关 - /** 销毁游戏 */ + /** + * 销毁游戏 + */ private void destroyMG() { if (playingGameId > 0) { sudFSTAPPDecorator.destroyMG(); @@ -197,7 +200,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { } } - /** 获取当前游戏房id */ + /** + * 获取当前游戏房id + */ public String getGameRoomId() { return gameRoomId; } @@ -330,7 +335,9 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { // endregion 游戏侧回调 - /** 处理code过期 */ + /** + * 处理code过期 + */ public void processOnExpireCode(SudFSTAPPDecorator sudFSTAPPDecorator, ISudFSMStateHandle handle) { // code过期,刷新code getCode(null, getUserId(), getAppId(), new GameGetCodeListener() { @@ -377,14 +384,16 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { }); } - /** 通知游戏,游戏视图信息 */ + /** + * 通知游戏,游戏视图信息 + */ private void notifyGameViewInfo(ISudFSMStateHandle handle, int gameViewWidth, int gameViewHeight) { GameViewInfoModel gameViewInfoModel = new GameViewInfoModel(); gameViewInfoModel.ret_code = 0; // 游戏View大小 gameViewInfoModel.view_size.width = gameViewWidth; gameViewInfoModel.view_size.height = gameViewHeight; - + gameViewInfoModel.view_game_rect.bottom = gameViewHeight / 10; // 游戏安全操作区域 getGameRect(gameViewInfoModel); @@ -415,16 +424,24 @@ public abstract class BaseGameViewModel implements SudFSMMGListener { handle.success(SudJsonUtils.toJson(gameConfigModel)); } - /** 游戏login(getCode)监听 */ + /** + * 游戏login(getCode)监听 + */ public interface GameGetCodeListener { - /** 成功 */ + /** + * 成功 + */ void onSuccess(String code); - /** 失败 */ + /** + * 失败 + */ void onFailed(); } - /** 获取游戏状态缓存 */ + /** + * 获取游戏状态缓存 + */ public SudFSMMGCache getSudFSMMGCache() { return sudFSMMGDecorator.getSudFSMMGCache(); } 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 0f2d70691..03447ba18 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java @@ -21,6 +21,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.model.GameViewInfoModel; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -105,6 +106,7 @@ public class LiveSudGamePopup extends BottomPopupView { GameConfigModel gameConfigModel = gameViewModel.getGameConfigModel(); gameConfigModel.ui.ping.hide = true; // 配置不隐藏ping值 gameConfigModel.ui.level.hide = true; // 配置不隐藏ping值 + // SudMGP平台64bit游戏ID gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID); } 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 0e8a9d5b2..40405986d 100644 --- a/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/SudGameListViewHolder.java @@ -38,7 +38,8 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber; private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5; private GifImageView gifImageView; - private ImageView sex; + private ImageView sex,game_icon; + public SudGameListViewHolder(@NonNull View itemView) { super(itemView); @@ -46,6 +47,7 @@ public class SudGameListViewHolder extends RecyclerView.ViewHolder { roomName = itemView.findViewById(R.id.room_name); playerWeAre = itemView.findViewById(R.id.player_we_are); playerWeAre2 = itemView.findViewById(R.id.player_we_are_2); + game_icon = itemView.findViewById(R.id.game_icon); goldenBeanNumber = itemView.findViewById(R.id.golden_bean_number); gifImageView = itemView.findViewById(R.id.btn_live); avatarList1 = itemView.findViewById(R.id.avatar_list1); @@ -73,31 +75,32 @@ 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; - } - } +// 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 public void onViewClicks() { diff --git a/common/src/main/res/layout/activity_sud_game.xml b/common/src/main/res/layout/activity_sud_game.xml index f3ca4602d..66db5e2e0 100644 --- a/common/src/main/res/layout/activity_sud_game.xml +++ b/common/src/main/res/layout/activity_sud_game.xml @@ -42,7 +42,7 @@ android:gravity="center" android:text="@string/video_exit" android:textColor="#FFFFFF" - android:textSize="12sp" /> + android:textSize="8sp" /> \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_home_search_sud_game.xml b/common/src/main/res/layout/dialog_home_search_sud_game.xml index c160673b0..13a5785c7 100644 --- a/common/src/main/res/layout/dialog_home_search_sud_game.xml +++ b/common/src/main/res/layout/dialog_home_search_sud_game.xml @@ -49,10 +49,12 @@ android:layout_width="266dp" android:layout_height="wrap_content" android:background="@null" + android:ellipsize="end" android:hint="@string/interactive_game_search_room_name_input" android:paddingStart="5dp" android:paddingTop="9dp" android:paddingBottom="9dp" + android:singleLine="true" android:textColor="#000" android:textColorHint="#000" android:textSize="10sp" /> @@ -112,7 +114,7 @@ android:paddingTop="12dp" android:paddingEnd="30dp" android:paddingBottom="12dp" - android:text="暫未搜索結果~" + android:text="@string/interactive_game_search_room_have_been_found" android:textColor="#CCFFFFFF" android:textSize="14sp" /> diff --git a/common/src/main/res/layout/dialog_live_new_function.xml b/common/src/main/res/layout/dialog_live_new_function.xml index 22711cedf..d39091d5b 100644 --- a/common/src/main/res/layout/dialog_live_new_function.xml +++ b/common/src/main/res/layout/dialog_live_new_function.xml @@ -265,13 +265,13 @@ + android:src="@mipmap/iconlive_tool_game" /> diff --git a/common/src/main/res/layout/dialog_live_sud_game.xml b/common/src/main/res/layout/dialog_live_sud_game.xml index 7648882f5..4cdd64391 100644 --- a/common/src/main/res/layout/dialog_live_sud_game.xml +++ b/common/src/main/res/layout/dialog_live_sud_game.xml @@ -42,7 +42,7 @@ android:gravity="center" android:text="@string/video_exit" android:textColor="#FFFFFF" - android:textSize="12sp" /> + android:textSize="8sp" /> diff --git a/common/src/main/res/layout/dialog_sud_game_list.xml b/common/src/main/res/layout/dialog_sud_game_list.xml index 903115206..ac12f7a65 100644 --- a/common/src/main/res/layout/dialog_sud_game_list.xml +++ b/common/src/main/res/layout/dialog_sud_game_list.xml @@ -69,7 +69,7 @@ android:layout_marginStart="14dp" android:text="@string/interactive_game_room_game" android:textColor="#fff" - android:textSize="14sp" /> + android:textSize="11sp" /> + android:textSize="11sp" /> + + + android:textSize="11sp" /> + android:textSize="11sp" /> + android:textSize="11sp" /> + android:gravity="center_vertical" + android:orientation="horizontal"> + android:textSize="11sp" /> + + @@ -185,7 +202,7 @@ android:gravity="center" android:text="@string/interactive_game_room_random_start" android:textColor="#FF8100" - android:textSize="18sp" /> + android:textSize="16sp" /> \ No newline at end of file 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 78cb44d55..caacc51ee 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 @@ -55,10 +55,19 @@ android:textColor="#000" android:textSize="14sp" /> + + @@ -71,7 +80,8 @@ + android:layout_height="20dp" + android:visibility="gone"> - + @@ -135,24 +139,59 @@ android:layout_weight="1" /> + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginEnd="3dp" + android:orientation="vertical"> - + + + + + + + + android:layout_gravity="bottom" + android:layout_marginTop="10dp" + android:gravity="bottom"> - + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/item_sud_game_list.xml b/common/src/main/res/layout/item_sud_game_list.xml index e771c1446..3e12bd9b6 100644 --- a/common/src/main/res/layout/item_sud_game_list.xml +++ b/common/src/main/res/layout/item_sud_game_list.xml @@ -1,10 +1,10 @@ + + + @@ -67,7 +77,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6dp" - android:gravity="center_vertical"> + android:gravity="center_vertical" + android:visibility="gone"> - @@ -134,25 +138,59 @@ android:layout_height="1dp" android:layout_weight="1" /> - - + + + + + + + + + + android:layout_gravity="bottom" + android:layout_marginTop="10dp" + android:gravity="bottom"> - + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxxhdpi/iconlive_tool_game.png b/common/src/main/res/mipmap-xxxhdpi/iconlive_tool_game.png new file mode 100644 index 000000000..f624e39a0 Binary files /dev/null and b/common/src/main/res/mipmap-xxxhdpi/iconlive_tool_game.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 529bdda6d..b18a5216d 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1320,7 +1320,7 @@ Limited ride And limited avatar frame Join a fans club Interactive Games Room list - Game: + Game: All Threshold: owner: @@ -1345,5 +1345,6 @@ Limited ride And limited avatar frame 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 diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index a556cdac7..7685e6a3a 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1341,4 +1341,5 @@ 搜索房間 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 + 暫未搜索結果~ diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 7b17db012..9ebbfecbc 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1340,4 +1340,5 @@ 搜索房間 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 + 暫未搜索結果~ diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index ef742ca22..29922b393 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1341,5 +1341,6 @@ 搜索房間 搜索历史 請輸入您要搜索的房主昵稱、房主ID或房間名 + 暫未搜索結果~ diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 684b42cd0..641ff6ab3 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1322,7 +1322,7 @@ Limited ride And limited avatar frame Join a fans club Interactive Games Room list - Game: + Game: All Threshold: owner: @@ -1347,4 +1347,5 @@ Limited ride And limited avatar frame 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 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 c887ba4e3..a63eb679b 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1117,16 +1117,16 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } }, 3000); } - 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(); - } +// 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); } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java index 7340e3b59..a70963f5a 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java @@ -101,7 +101,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement @Override public void loadData(int p, com.yunbao.common.http.HttpCallback callback) { - LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", p, callback); + LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", p-1, callback); } @Override diff --git a/main/src/main/res/layout/view_main_home_sud_game_list.xml b/main/src/main/res/layout/view_main_home_sud_game_list.xml index 218973e2c..a33947ca6 100644 --- a/main/src/main/res/layout/view_main_home_sud_game_list.xml +++ b/main/src/main/res/layout/view_main_home_sud_game_list.xml @@ -62,7 +62,7 @@ android:layout_marginStart="14dp" android:text="@string/interactive_game_room_game" android:textColor="#000" - android:textSize="14sp" + android:textSize="11sp" android:textStyle="bold" /> + android:textSize="11sp" /> @@ -96,7 +98,7 @@ android:layout_marginStart="20dp" android:text="@string/interactive_game_room_sill" android:textColor="#000" - android:textSize="14sp" + android:textSize="11sp" android:textStyle="bold" /> + android:textSize="11sp" /> + android:textSize="11sp" /> + + + android:layout_marginEnd="5dp" + android:src="@mipmap/icon_interactive_game_arrow" /> @@ -183,7 +194,7 @@ android:gravity="center" android:text="@string/interactive_game_room_random_start" android:textColor="#FF8100" - android:textSize="18sp" + android:textSize="16sp" app:layout_constraintBottom_toBottomOf="@+id/refreshView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" />