From cbb15313564d5ae0924cd346094dad45dfcf6716 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 14 Apr 2023 10:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E6=84=BF=E5=8D=95=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/views/LiveRoomViewHolder.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 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();