From 192b0cb417d0066e44ba8c524eb72a5090d3ac8e Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 25 Oct 2023 10:09:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B0=8F=E9=81=8A=E6=88=B2=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../res/drawable/background_live_sud_hint.png | Bin 0 -> 6630 bytes .../yunbao/live/views/LiveRoomViewHolder.java | 14 +++--- live/src/main/res/layout/view_live_room.xml | 40 +++++++++++------- 3 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 common/src/main/res/drawable/background_live_sud_hint.png diff --git a/common/src/main/res/drawable/background_live_sud_hint.png b/common/src/main/res/drawable/background_live_sud_hint.png new file mode 100644 index 0000000000000000000000000000000000000000..e98cf1c4801b5d766f6dc89ebfd55a2d58dcf52f GIT binary patch literal 6630 zcmeHM_dlC`xR%(YHW8!tC^Z_hS`xdl8b!TDtfIUXqef~*j9OI{6jh^Ctr|s9igajE zqo~@m)UMhy$#F(;{)O{7zkHwPm;3(QZ{8QH%xZef0e7{NUGFBdME=cv_{cvxWkcAt$-;tCqq)cuye&yPh- zu4Sj;naEom9hpw()prZijXHgpcGs<+!uJq0JO7#{-!wO{*dY`~0i+ZBuR~rJsQid2++lOqUJ%M1 z*V!5Ku-51y$*=dI`d;wwI!S zt)f)QY|v^mm)%-z(KJBdZ`^PSTnx3*n7SKHLcrvwWnr>}LPTN_?QgP9Kl|W=p@aQ7 zpS&L$Vjri?s@`S{I7Hkd&$M;lYIS9!z>s%aG*)*qgM!e|I#fK@de+NgP5_VOqAu=P|nUzln1uVfN3Kw{(@Ej zBgz!^vDld5or;ko;hN@r&pGgaSK&WPp(8#uGkXJwRPdZ=vWZJhZCiQP_W1xjyVq-H zKHn`94ZJ;F*L-jF5(KRwohKXPaal~V6B*ai^m#|gxlJ9APn{I<)J^tpUBloKI7B{0 zsI$fE*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ZM44H9eM< z+HKDM=-~8Y)f&cN6%Vc_4d+;ZuaCuzSFY_OgSKQ0LjDR81@H~fYFVV}-r)n+j5@Oi zB`<;dqu84R944$KnNTODX`Y1U3zS5EB^X(194ZTk5(6r5!8M+@tdU_c4jt&w(Vdvpp@`2x*5q@$32g-KTMGEZ2x+m!V{#5E0#qYDRD+S5-6}`E-Z_?cL)6mgU@PMMW+>e=yiI9s z9ROipDP5J(BqoKIBt=xZ_@ocLzHRX1CQN3&`>3QUI)1(4cy$fyp*dhl3*cZ^r53fF|EVhor5q z!Uw+lkLBfz&gs*E;PtNeuI~59!Mc*UN*-E!2jAzO@P0-SU%@fX%YUIA&{Douu5~-TVl+x zQMW>evrW|@ziaS~)v=F889^(xRb{nL$hTk#uXwkS>s}tJtMjY+={Sebnua*N7eW&n zT-u;WE(^8xuK!mAqH06z>OaBXZcUi&TjGmXo}@AmKG~lLcT;&Dd>mul>_XC)?~DDG zYm3pbx!$6btiEiCwKma+5<7u#fqZC--q1} z(BaZMVvr%}TT7=m@uAmY&Ce4N_cmD(bMrc-v|Gkn&^~k*@yoJpPb9x literal 0 HcmV?d00001 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 569ca21f7..3fe10691e 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -636,26 +636,28 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } private TextView sud_text_name; + private LinearLayout sud_layout_name; private Handler sudNameHandler = new Handler(); private Runnable sudNameRunnable = new Runnable() { @Override public void run() { - if (sud_text_name != null) { - sud_text_name.setVisibility(View.GONE); + if (sud_layout_name != null) { + sud_layout_name.setVisibility(View.GONE); } } }; public void setSudName(String sudName) { - sud_text_name = (TextView) findViewById(com.yunbao.common.R.id.sud_text_name); + sud_text_name = (TextView) findViewById(R.id.sud_text_name); + sud_layout_name = (LinearLayout) findViewById(R.id.sud_layout_name); sud_text_name.setText(WordUtil.isNewZh() ? String.format("主播创建了【%s】房间,快来与主播同玩~", sudName) : String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName)); - sud_text_name.setVisibility(View.VISIBLE); - ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() { + sud_layout_name.setVisibility(View.VISIBLE); + ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - sud_text_name.setVisibility(View.GONE); + sud_layout_name.setVisibility(View.GONE); } }); sudNameHandler.removeCallbacks(sudNameRunnable); diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 2995e1eb0..b7080669b 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -2478,21 +2478,31 @@ android:layout_marginTop="80dp" app:autoPlay="true" /> - + android:layout_marginEnd="42dp" + android:paddingStart="21dp" + android:visibility="gone" + android:paddingEnd="15dp"> + + + + From b191dfb1be1439a00788306cf620d4bca759d8cc Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 26 Oct 2023 14:42:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=8F=E9=81=8A=E6=88=B2=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/bean/EnterRoomNewModel.java | 11 ++ .../yunbao/common/bean/SudGameDateModel.java | 175 ++++++++++++++++++ .../res/drawable/background_live_sud_hint.png | Bin 6630 -> 8582 bytes config.gradle | 4 +- .../live/activity/LiveAudienceActivity.java | 9 +- .../yunbao/live/event/LiveAudienceEvent.java | 21 +++ .../yunbao/live/socket/SocketRyClient.java | 4 +- .../yunbao/live/views/LiveRoomViewHolder.java | 18 +- .../live/views/PortraitLiveManager.java | 7 +- live/src/main/res/layout/view_live_room.xml | 2 +- 10 files changed, 237 insertions(+), 14 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java diff --git a/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java b/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java index e45947c1d..35d6b7295 100644 --- a/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java +++ b/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java @@ -37,6 +37,17 @@ public class EnterRoomNewModel extends BaseModel { private String sudGameRoomStatus; @SerializedName("sud_game_room_name") private String sudGameRoomName; + @SerializedName("sud_gameDate") + private SudGameDateModel sudGameDateModel; + + public SudGameDateModel getSudGameDateModel() { + return sudGameDateModel; + } + + public EnterRoomNewModel setSudGameDateModel(SudGameDateModel sudGameDateModel) { + this.sudGameDateModel = sudGameDateModel; + return this; + } public String getSudGameRoomName() { return sudGameRoomName; diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java new file mode 100644 index 000000000..eb28839e4 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java @@ -0,0 +1,175 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class SudGameDateModel extends BaseModel{ + + @SerializedName("room_holder_id") + private String roomHolderId; + @SerializedName("sex") + private String sex; + @SerializedName("golden_bean_number") + private String goldenBeanNumber; + + @SerializedName("room_holder_type") + private String roomHolderType; + @SerializedName("sud_game_id") + private String sudGameId; + @SerializedName("room_status") + private String roomStatus; + @SerializedName("sud_game_name") + private String sudGameName; + @SerializedName("room_name") + private String roomName; + @SerializedName("player_total") + private String playerTotal; + @SerializedName("sud_game_icon") + private String sudGameIcon; + @SerializedName("room_holder_name") + private String roomHolderName; + @SerializedName("sud_game_room_id") + private String sudGameRoomId; + @SerializedName("ob_total") + private String obTotal; + @SerializedName("avatar") + private String avatar; + @SerializedName("liveuid") + private String liveuid; + + public String getRoomHolderId() { + return roomHolderId; + } + + public SudGameDateModel setRoomHolderId(String roomHolderId) { + this.roomHolderId = roomHolderId; + return this; + } + + public String getSex() { + return sex; + } + + public SudGameDateModel setSex(String sex) { + this.sex = sex; + return this; + } + + public String getGoldenBeanNumber() { + return goldenBeanNumber; + } + + public SudGameDateModel setGoldenBeanNumber(String goldenBeanNumber) { + this.goldenBeanNumber = goldenBeanNumber; + return this; + } + + + + public String getRoomHolderType() { + return roomHolderType; + } + + public SudGameDateModel setRoomHolderType(String roomHolderType) { + this.roomHolderType = roomHolderType; + return this; + } + + public String getSudGameId() { + return sudGameId; + } + + public SudGameDateModel setSudGameId(String sudGameId) { + this.sudGameId = sudGameId; + return this; + } + + public String getRoomStatus() { + return roomStatus; + } + + public SudGameDateModel setRoomStatus(String roomStatus) { + this.roomStatus = roomStatus; + return this; + } + + public String getSudGameName() { + return sudGameName; + } + + public SudGameDateModel setSudGameName(String sudGameName) { + this.sudGameName = sudGameName; + return this; + } + + public String getRoomName() { + return roomName; + } + + public SudGameDateModel setRoomName(String roomName) { + this.roomName = roomName; + return this; + } + + public String getPlayerTotal() { + return playerTotal; + } + + public SudGameDateModel setPlayerTotal(String playerTotal) { + this.playerTotal = playerTotal; + return this; + } + + public String getSudGameIcon() { + return sudGameIcon; + } + + public SudGameDateModel setSudGameIcon(String sudGameIcon) { + this.sudGameIcon = sudGameIcon; + return this; + } + + public String getRoomHolderName() { + return roomHolderName; + } + + public SudGameDateModel setRoomHolderName(String roomHolderName) { + this.roomHolderName = roomHolderName; + return this; + } + + public String getSudGameRoomId() { + return sudGameRoomId; + } + + public SudGameDateModel setSudGameRoomId(String sudGameRoomId) { + this.sudGameRoomId = sudGameRoomId; + return this; + } + + public String getObTotal() { + return obTotal; + } + + public SudGameDateModel setObTotal(String obTotal) { + this.obTotal = obTotal; + return this; + } + + public String getAvatar() { + return avatar; + } + + public SudGameDateModel setAvatar(String avatar) { + this.avatar = avatar; + return this; + } + + public String getLiveuid() { + return liveuid; + } + + public SudGameDateModel setLiveuid(String liveuid) { + this.liveuid = liveuid; + return this; + } +} diff --git a/common/src/main/res/drawable/background_live_sud_hint.png b/common/src/main/res/drawable/background_live_sud_hint.png index e98cf1c4801b5d766f6dc89ebfd55a2d58dcf52f..9b11c5af2bcb031651c55c7bd42b61dc65a71edf 100644 GIT binary patch literal 8582 zcmeHN=R2HVw;o0rWf+X!MsyM_Y7jGejS?*+2ob%6h#F(`5=_)YZ$U`3h!VZm3?k7p zj2@x~(NBKwdyaUo>-+`hI$xgW`Lfnt``-6zdp%Klchtb7Or!t+0IZ>|YybcNfq%Ze zK}3I^mcAJde_nW=25O3cG7QTP000KiP(~Q~SZrh>U)b8+>zO^Ak!^6{Hxp4*M5qiq z?ohrUDM+fh`9byuEkgN(hMXW*9dN`UuKEJjo%E$p94di_ppGR`<)(cz_{>BS{U!xM z!yOExev_k@i+@%rD|?t_lXdt!`%rFWu*q|45cB%`=+Vs6N&g}FL;0E6 z7u^1CSJ#I-bX_z(w!SaDH^sKj5)Qivjf`9#LhpnD2w(s_5FCIH32Mdi%#Ci;zPFbb zvZTNLyrkrJb4kV_wom^^ZX26yw7&&hxqZ+0d^J$&d~oNZC;RW=%9iKu7M~9M($AOE z-n^kd`O?(sdpIA48&0<6r}qY-eDyuq{^|!1q!Dy7&?6u(b|0OdJo+`Tb1hS7wiGga zxcdM~7{*M8jqR~n$!sYSD3#S^L#_hZ8&|T3AMa%G6O}bT{jt{8I&0{6@yOEX#IR}b z6!%VWPyVX%0~jg_3!nmYZ&S9zRA!4KV37b$(nTLSG6YoGMA=rK7Na0i)?a(RgX=(k zVw`^~c@{%QKO{SFqQC+TSy!`V?1lq=wiP9thyMj-^+juV>@!-zZY@}QYdFbU04NK^ zMe$V&q8J(6(@GfMR?IT{WcTL>e~;>q(aStAj^jiD(y)ZQ-JXE*BOuWH0Us|k#)RWswRz~F3brBFd$ZH;<0+Q2 zG&?COZ2f^(AG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ZC--q1} z(BaZMVvr%}TT7=m@uAmY&Ce4N_cmD(bMrc-v|Gkn&^~k*@yoJpPb9x diff --git a/config.gradle b/config.gradle index a4c1d2a21..808d3435f 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : " https://ceshi.yaoulive.com", + serverHost : " https://ceshi.yaoulive.com", 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 ba2bc9010..3712281bc 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -777,9 +777,9 @@ public class LiveAudienceActivity extends LiveActivity { @Subscribe(threadMode = ThreadMode.MAIN) public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) { - if (manager!=null&&manager.getsudGameMin()){ - ToastUtil.show(WordUtil.isNewZh()?"小遊戲進行中,無法切換直播間":"Game in progress, unable to switch to live room"); - }else { + if (manager != null && manager.getsudGameMin()) { + ToastUtil.show(WordUtil.isNewZh() ? "小遊戲進行中,無法切換直播間" : "Game in progress, unable to switch to live room"); + } else { LiveBean liveBean = e.getLiveBean(); if (TextUtils.equals(mLiveUid, liveBean.getUid())) { ToastUtil.show(mContext.getString(R.string.current_live_room)); @@ -808,7 +808,6 @@ public class LiveAudienceActivity extends LiveActivity { } - } @Override @@ -1542,7 +1541,7 @@ public class LiveAudienceActivity extends LiveActivity { break; case SUD_GAME_CREATE_ROOM: if (manager != null) { - manager.setSudName(event.getAvatar()); + manager.setSudName(event.getAvatar(), event.getCreateSudRoomModel()); } break; diff --git a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java index 653cf3dd2..fbffbf9d8 100644 --- a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java +++ b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java @@ -5,11 +5,13 @@ import com.yunbao.common.bean.ActiveModel; import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.AnchorRecommendItemModel; import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.MsgModel; import com.yunbao.common.bean.OlineUserlistModel; import com.yunbao.common.bean.RedPacketInfoModel; import com.yunbao.common.bean.RedPacketModel; +import com.yunbao.common.bean.SudGameDateModel; import com.yunbao.common.bean.WishModel; import com.yunbao.common.bean.XydCompleteModel; import com.yunbao.common.event.AllServerNotifyEvent; @@ -56,6 +58,25 @@ public class LiveAudienceEvent extends BaseModel { private boolean isPk; public String mStream; public String mLiveUid, giftId; + public SudGameDateModel createSudRoomModel; + + public SudGameDateModel getCreateSudRoomModel() { + return createSudRoomModel; + } + + public LiveAudienceEvent setCreateSudRoomModel(SudGameDateModel createSudRoomModel) { + this.createSudRoomModel = createSudRoomModel; + return this; + } + + public boolean isContactGift() { + return isContactGift; + } + + public LiveAudienceEvent setContactGift(boolean contactGift) { + isContactGift = contactGift; + return this; + } public String getGiftId() { return giftId; diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 6d72f9f58..ada6fc712 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -31,6 +31,7 @@ import com.yunbao.common.bean.PkRankBean; import com.yunbao.common.bean.RedPacketInfoModel; import com.yunbao.common.bean.RedPacketModel; import com.yunbao.common.bean.SocketModel; +import com.yunbao.common.bean.SudGameDateModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.WishModel; import com.yunbao.common.bean.XydCompleteModel; @@ -753,7 +754,8 @@ public class SocketRyClient { case "SudGameCreateRoom": Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM) - .setAvatar(map.getString("room_name"))); + .setAvatar(map.getString("room_name")) + .setCreateSudRoomModel(GsonUtils.fromJson(map.toString(), SudGameDateModel.class))); break; } 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 3fe10691e..240a922f9 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -67,6 +67,7 @@ import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.FansCheckRed; import com.yunbao.common.bean.GiftModel; import com.yunbao.common.bean.GuardUserModel; @@ -90,6 +91,7 @@ import com.yunbao.common.bean.RedPacketInfoModel; import com.yunbao.common.bean.RedPacketModel; import com.yunbao.common.bean.RewardAllModel; import com.yunbao.common.bean.StarChallengeStatusModel; +import com.yunbao.common.bean.SudGameDateModel; import com.yunbao.common.bean.TaskModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.WishModel; @@ -128,6 +130,7 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.views.AbsViewHolder; +import com.yunbao.common.views.LiveSudGamePopup; import com.yunbao.common.views.weight.ClipPathCircleImage; import com.yunbao.common.views.weight.FullServiceNotificationView; import com.yunbao.common.views.weight.NobleNoticeView; @@ -647,7 +650,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } }; - public void setSudName(String sudName) { + public void setSudName(String sudName, SudGameDateModel sudGameDateModel) { sud_text_name = (TextView) findViewById(R.id.sud_text_name); sud_layout_name = (LinearLayout) findViewById(R.id.sud_layout_name); sud_text_name.setText(WordUtil.isNewZh() ? @@ -657,7 +660,18 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - sud_layout_name.setVisibility(View.GONE); + CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); + createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId()); + createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); + createSudRoomModel.setAvatar(sudGameDateModel.getAvatar()); + createSudRoomModel.setRoomName(sudGameDateModel.getRoomName()); + createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName()); + new XPopup.Builder(mContext) + .enableDrag(false) + .dismissOnTouchOutside(false) + .dismissOnBackPressed(false) + .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) + .show(); } }); sudNameHandler.removeCallbacks(sudNameRunnable); 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 67d42ffbf..4264096d6 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -45,6 +45,7 @@ import com.yunbao.common.bean.MsgModel; import com.yunbao.common.bean.RedPacketInfoModel; import com.yunbao.common.bean.RedPacketModel; import com.yunbao.common.bean.StarChallengeStatusModel; +import com.yunbao.common.bean.SudGameDateModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.WishModel; import com.yunbao.common.bean.XydCompleteModel; @@ -721,7 +722,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.hindeRedPacket(); } if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) { - mLiveRoomViewHolder.setSudName(data.getSudGameRoomName()); + mLiveRoomViewHolder.setSudName(data.getSudGameRoomName(), data.getSudGameDateModel()); } } @@ -1968,9 +1969,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } } - public void setSudName(String sudName) { + public void setSudName(String sudName, SudGameDateModel sudGameDateModel) { if (mLiveRoomViewHolder != null) { - mLiveRoomViewHolder.setSudName(sudName); + mLiveRoomViewHolder.setSudName(sudName, sudGameDateModel); } } diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index b7080669b..556ee4257 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -2500,7 +2500,7 @@ android:scrollHorizontally="true" android:singleLine="true" android:text="主播創建了【游戲名】房間,快來與主播同玩~" - android:textColor="@color/black3" + android:textColor="@color/white" android:textSize="14sp" /> From adcafc7e16c9b8743eca86c35954ef4b049cbcec Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Thu, 26 Oct 2023 14:50:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=84=E7=90=86=20=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E5=BC=82=E5=B8=B8=20CommonAppContext.getTopActivity()?= =?UTF-8?q?=3D=3Dnull=20=E4=B8=BB=E8=A6=81=E5=A4=84=E7=90=86=E4=BA=86=20To?= =?UTF-8?q?astUtil,OpenAdManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/CommonAppContext.java | 7 ++- .../yunbao/common/http/CommonHttpUtil.java | 2 +- .../yunbao/common/manager/OpenAdManager.java | 56 +++++++++---------- .../com/yunbao/common/utils/ToastUtil.java | 34 +++++++---- 4 files changed, 55 insertions(+), 44 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/CommonAppContext.java b/common/src/main/java/com/yunbao/common/CommonAppContext.java index 453490b55..269464e41 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppContext.java +++ b/common/src/main/java/com/yunbao/common/CommonAppContext.java @@ -56,9 +56,7 @@ public class CommonAppContext extends MultiDexApplication { //设置新加坡融云服务器 有时候国内收不到推送是因为这个 RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null); //谷歌推送 - PushConfig gconfig = new PushConfig.Builder() - .enableFCM(true) - .build(); + PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build(); RongPushClient.setPushConfig(gconfig); //初始化友盟统计 // UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null); @@ -86,6 +84,9 @@ public class CommonAppContext extends MultiDexApplication { } public static Activity getTopActivity() { + if (activityWeakReference == null) { + return null; + } return activityWeakReference.get(); } diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index f573f278c..c90987dff 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -262,7 +262,7 @@ public class CommonHttpUtil { } }).build().show(); } else { - ToastUtil.show(CommonAppContext.getTopActivity().getString(R.string.net_error) + "code:" + code + " msg:" + msg); + ToastUtil.show(context.getString(R.string.net_error) + "code:" + code + " msg:" + msg); } } diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index b9e967df9..7d64a092c 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -1,5 +1,6 @@ package com.yunbao.common.manager; +import android.content.Context; import android.os.Handler; import android.os.Looper; import android.util.Log; @@ -52,29 +53,32 @@ public class OpenAdManager { if (list != null && list.isEmpty()) { return; } - if(CommonAppContext.getTopActivity()==null){ + Context context = CommonAppContext.getTopActivity(); + if (context == null) { + context = CommonAppContext.sInstance; + } + if (context == null) { return; } - LiveNetManager.get(CommonAppContext.getTopActivity()) - .activityPopup(new HttpCallback>() { - @Override - public void onSuccess(List data) { - if (data == null || data.isEmpty()) { - Log.i(TAG, "onSuccess: 没有数据"); - list = new ArrayList<>(); - return; - } - list = data; - if (isShow) { - show(TYPE_HOME, false); - } - } + LiveNetManager.get(context).activityPopup(new HttpCallback>() { + @Override + public void onSuccess(List data) { + if (data == null || data.isEmpty()) { + Log.i(TAG, "onSuccess: 没有数据"); + list = new ArrayList<>(); + return; + } + list = data; + if (isShow) { + show(TYPE_HOME, false); + } + } - @Override - public void onError(String error) { - System.err.println("弹框列表:" + error); - } - }); + @Override + public void onError(String error) { + System.err.println("弹框列表:" + error); + } + }); } @@ -163,15 +167,11 @@ public class OpenAdManager { } showMap.put(model.getId(), true); if (model.getModel() == OpenAdModel.MODEL_BOTTOM) { - new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model) - .setListener((bean, position) -> { - }) - .showDialog(); + new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> { + }).showDialog(); } else { - new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model) - .setListener((bean, position) -> { - }) - .showDialog(); + new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> { + }).showDialog(); } } } diff --git a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java index 80304292f..e0808c4af 100644 --- a/common/src/main/java/com/yunbao/common/utils/ToastUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/ToastUtil.java @@ -60,11 +60,19 @@ public class ToastUtil { /** * 显示黑底白字的提示 * - * @param content 内容 + * @param content 内容 * @param delayMillis 显示时间 毫秒 */ public static void showStyle(String content, long delayMillis) { - Dialog dialog = new Dialog(CommonAppContext.getTopActivity(), R.style.dialog); + Context context = CommonAppContext.getTopActivity(); + if (context == null) { + context = CommonAppContext.sInstance; + } + if (context == null) { + return; + } + + Dialog dialog = new Dialog(context, R.style.dialog); dialog.setContentView(R.layout.dialog_toast); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); @@ -79,14 +87,16 @@ public class ToastUtil { dialog.show(); new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis); } - public static void showDebug(String s){ - if(BuildConfig.DEBUG){ - show("开发模式:"+s); + + public static void showDebug(String s) { + if (BuildConfig.DEBUG) { + show("开发模式:" + s); } } - public static void showDebug(int s){ - if(BuildConfig.DEBUG){ - show("开发模式:"+s); + + public static void showDebug(int s) { + if (BuildConfig.DEBUG) { + show("开发模式:" + s); } } @@ -94,10 +104,10 @@ public class ToastUtil { if (TextUtils.isEmpty(s)) { return; } - Log.i("Toast", "Toast show: "+s); - Log.i("ts","ll"); - Toast.makeText(CommonAppContext.sInstance,s,Toast.LENGTH_SHORT).show(); - Log.i("ts","22"); + Log.i("Toast", "Toast show: " + s); + Log.i("ts", "ll"); + Toast.makeText(CommonAppContext.sInstance, s, Toast.LENGTH_SHORT).show(); + Log.i("ts", "22"); // long curTime = System.currentTimeMillis(); // if (curTime - sLastTime > 2000) {