From c22da60b821e604ed247429ed0e24e9af3a0bdf3 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 29 Mar 2023 13:39:09 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=81=94=E7=B3=BB=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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 537be4780..9f1122571 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -4312,6 +4312,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void initTopBanner() { checkNewLetter(); mTopBannerList = new ArrayList<>(); + topBanner1.setVisibility(View.GONE); topBanner1.setAutoPlay(true) .setPages(mTopBannerList, new Banner4CustomViewHolder()) .setDelayTime(3000) @@ -4327,7 +4328,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis checkNewLetter(); } ); - fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss,500)); + fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500)); Bundle bundle = new Bundle(); bundle.putString(Constants.LIVE_UID, mLiveUid); bundle.putString(Constants.LIVE_STREAM, mStream); @@ -4344,12 +4345,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onSuccess(LiveAnchorCallMeModel data) { System.out.println(">>>>> 获取联系方式:" + data); - BannerBean call = new BannerBean(); - call.setIconRes(R.mipmap.ic_live_float_call_me); - call.setActivityId(data.getGiftId()); - call.setType(TOP_BANNER_TYPE_CALL_ME); - mTopBannerList.add(0, call); - topBanner1.update(mTopBannerList); + if (data.getIsShow() == 1) { + topBanner1.setVisibility(View.VISIBLE); + BannerBean call = new BannerBean(); + call.setIconRes(R.mipmap.ic_live_float_call_me); + call.setActivityId(data.getGiftId()); + call.setType(TOP_BANNER_TYPE_CALL_ME); + mTopBannerList.add(0, call); + topBanner1.update(mTopBannerList); + } }