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); + } }