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 b7f2dafc4..81a096d7f 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -658,7 +658,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis // } public void endDRGif() { - if (dr_pk_end_gif.getVisibility() == View.GONE) { + if (dr_pk_end_gif.getVisibility() == View.GONE && isShowGif) { dr_pk_end_gif.setVisibility(View.VISIBLE); visibility = false; RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置 @@ -4400,12 +4400,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private TextView textGrade1, textGrade2, textGrade3, textGrade4; private ImageView imageGrade1, imageGrade2, imageGrade3, imageGrade4; private LinearLayout linearGrade1, linearGrade2, linearGrade3, linearGrade4; + private boolean isShowGif = false; /** * PK倒计时 */ private String userId2, userId3 = "", userId4; public void upDataPkScore(JSONArray pkScores, int time) { + isShowGif = true; if (detailsView == null) { detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null); timeTitle = detailsView.findViewById(R.id.time_title); @@ -4556,6 +4558,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }; public void removeDetailView() { + if (detailsView != null) { mRoot.removeView(detailsView); detailsView = null; @@ -4565,6 +4568,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (mHandler != null) { mHandler.removeMessages(WHAT_PK_TIME); } + isShowGif = false; } /** @@ -4783,7 +4787,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mTopBannerList = new ArrayList<>(); } // if(sayModel!=null&&sayModel.getLivePreview().getIsShow()==1&&sa) - if (!isHinde){ + if (!isHinde) { topBanner1.setVisibility(View.VISIBLE); } @@ -4971,7 +4975,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void onSuccess(LiveAnchorCallMeModel data) { System.out.println(">>>>> 获取联系方式:" + data); if (data.getIsShow() == 1) { - if (!isHinde){ + if (!isHinde) { topBanner1.setVisibility(View.VISIBLE); } BannerBean call = new BannerBean();