From cf169e9a4e38b7d504e2a8ff31d8b2ea6c6c70cc Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 7 Oct 2023 10:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=B8=E6=88=8F=E7=9A=84ne?= =?UTF-8?q?w=E5=9B=BE=E6=A0=87=E5=B1=95=E7=A4=BA=EF=BC=8C=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=E4=B8=AD=E8=8B=B1=E6=96=87=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/adapter/InteractionGamesAdapter.java | 4 ++-- .../yunbao/common/bean/CustomSidebarChildModel.java | 11 +++++++++++ .../yunbao/common/bean/CustomSidebarInfoModel.java | 11 +++++++++++ .../common/views/InteractionGamesChildViewHolder.java | 6 +++++- common/src/main/res/layout/dialog_create_sud_game.xml | 8 ++++++-- .../main/res/layout/dialog_home_create_sud_game.xml | 4 ++++ .../view_live_new_role_fun_games_child_view3.xml | 4 +++- .../java/com/yunbao/live/activity/LiveActivity.java | 3 ++- .../com/yunbao/live/dialog/LiveHDDialogFragment.java | 3 ++- .../com/yunbao/live/views/LiveRoomViewHolder.java | 8 ++++---- 10 files changed, 50 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/adapter/InteractionGamesAdapter.java b/common/src/main/java/com/yunbao/common/adapter/InteractionGamesAdapter.java index 7b906da7a..9bd25c0d3 100644 --- a/common/src/main/java/com/yunbao/common/adapter/InteractionGamesAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/InteractionGamesAdapter.java @@ -31,7 +31,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games_child_view, parent, false); + View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false); return new InteractionGamesChildViewHolder(runGamesView); } @@ -46,7 +46,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter { long activityID = TextUtils.isEmpty(model.getSrc()) ? 0 : Long.parseLong(model.getSrc()); if (activityID != 0) { Bus.get().post(new CustomDrawerPopupEvent() - .setDisMiss(true).setInteractionID(activityID).setInteraction(true)); + .setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(child)); } diff --git a/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java index 481f17600..ca6cab442 100644 --- a/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java +++ b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java @@ -34,6 +34,17 @@ public class CustomSidebarChildModel extends BaseModel { private String flag = ""; @SerializedName("is_show") private String isShow; + @SerializedName("sud_game_is_new") + private String sudGameIsNew; + + public String getSudGameIsNew() { + return sudGameIsNew; + } + + public CustomSidebarChildModel setSudGameIsNew(String sudGameIsNew) { + this.sudGameIsNew = sudGameIsNew; + return this; + } public String getIsShow() { return isShow; diff --git a/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java b/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java index 5e3ab5547..e3eb057a9 100644 --- a/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java +++ b/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java @@ -26,6 +26,8 @@ public class CustomSidebarInfoModel extends BaseModel { private String src; @SerializedName("type") private String type; + @SerializedName("sud_game_is_new") + private String sudGameIsNew; @SerializedName("child") private List child; @@ -38,6 +40,15 @@ public class CustomSidebarInfoModel extends BaseModel { return this; } + public String getSudGameIsNew() { + return sudGameIsNew; + } + + public CustomSidebarInfoModel setSudGameIsNew(String sudGameIsNew) { + this.sudGameIsNew = sudGameIsNew; + return this; + } + public String getTitle() { return title; } diff --git a/common/src/main/java/com/yunbao/common/views/InteractionGamesChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/InteractionGamesChildViewHolder.java index c52725c62..8d1dde931 100644 --- a/common/src/main/java/com/yunbao/common/views/InteractionGamesChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/InteractionGamesChildViewHolder.java @@ -34,7 +34,11 @@ public class InteractionGamesChildViewHolder extends RecyclerView.ViewHolder { funGameName.setText(model.getTitle()); - + if (!TextUtils.isEmpty(model.getSudGameIsNew())||TextUtils.equals(model.getSudGameIsNew(),"1")){ + itemView.findViewById(R.id.icon_new_game).setVisibility(View.VISIBLE); + }else { + itemView.findViewById(R.id.icon_new_game).setVisibility(View.GONE); + } ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { 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 bff9c4ebb..7be9e36ef 100644 --- a/common/src/main/res/layout/dialog_create_sud_game.xml +++ b/common/src/main/res/layout/dialog_create_sud_game.xml @@ -47,6 +47,7 @@ diff --git a/common/src/main/res/layout/dialog_home_create_sud_game.xml b/common/src/main/res/layout/dialog_home_create_sud_game.xml index 871ca2391..01e461400 100644 --- a/common/src/main/res/layout/dialog_home_create_sud_game.xml +++ b/common/src/main/res/layout/dialog_home_create_sud_game.xml @@ -51,6 +51,7 @@ android:layout_height="wrap_content" android:text="@string/interactive_game_create_room_name" android:textColor="#000" + android:layout_marginEnd="5dp" android:textSize="14sp" /> diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 64ece985f..b03fe4699 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -41,6 +41,7 @@ import com.yunbao.common.utils.L; import com.yunbao.common.utils.ProcessImageUtil; import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.live.R; import com.yunbao.live.bean.GuardUserBean; @@ -1452,7 +1453,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL */ public void openLuckGiftTip() { UserBean u = CommonAppConfig.getInstance().getUserBean(); - String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName; + String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0"); startActivity(new Intent(this, ZhuangBanActivity.class).putExtra("url", url).putExtra("title", "")); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index 7c841de73..59579c46e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -191,7 +191,8 @@ public class LiveHDDialogFragment extends AbsDialogFragment { mWebView.setLayoutParams(params); } String url = bundle.getString("url"); - url += "&anchorUid=" + mLiveUid+"&stream="+mStream; + url += "&anchorUid=" + mLiveUid+"&stream="+mStream+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); + Log.e("H5--半屏",url); mWebView.loadUrl(url); mWebView.setWebViewClient(new WebViewClient() { @Override diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 67bfe648b..4e95f3d8d 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2046,13 +2046,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (link.equals("sc")) { String url; if (!"".equals(bean.getmIntoUrl()) && bean.getmIntoUrl() != null) { - url = CommonAppConfig.HOST + bean.getmIntoUrl() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken(); + url = CommonAppConfig.HOST + bean.getmIntoUrl() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); } else { - url = CommonAppConfig.HOST + "/h5/activity/firstTopUp/newUp.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken(); + url = CommonAppConfig.HOST + "/h5/activity/firstTopUp/newUp.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); } ZhuangBanActivity.forward(mContext, url, false, 1); } else if (link.equals("zxb")) { - String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + String url = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); ZhuangBanActivity.forward(mContext, url, false, 1); } else if (link.equals("xyd")) { openWishListWindow(); @@ -2317,7 +2317,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis url += "&"; } url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token=" - + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); bundle.putString("url", url); bundle.putInt("height", DpUtil.dp2px(500)); bundle.putInt("show_type", 0);