From 3807ff8916c680e389b72b61ca50b62afd83a7dc Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 6 Jul 2023 17:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BA=A2=E5=8C=85=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E8=81=94=E7=B3=BB=E6=96=B9=E5=BC=8F=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/dialog/GiftPopDialog.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java index c832dbf84..3a891c34e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java @@ -66,7 +66,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene private String title; private TextView mTitle; private boolean isOldGiftList = false; - private boolean hideGiftType=false; + private boolean hideGiftType = false; public GiftPopDialog(@NonNull Context context) { @@ -134,7 +134,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene if (!StringUtil.isEmpty(title)) { mTitle.setText(title); } - if(hideGiftType){ + if (hideGiftType) { findViewById(R.id.gift_tab_layout).setVisibility(GONE); } } @@ -227,7 +227,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene } giftTopAdapter.setList(name); - if(isOldGiftList){ + if (isOldGiftList) { showGiftList(JSON.parseArray(list.toJSONString(), LiveGiftBean.class)); return; } @@ -238,7 +238,13 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene } private void showGiftList(List list) { - mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list,""); + for (LiveGiftBean giftBean : list) { + if (giftBean.getType() == 9999999) { + list.remove(giftBean); + break; + } + } + mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list, ""); mLiveGiftPagerAdapter.setActionListener(this); mViewPager.setAdapter(mLiveGiftPagerAdapter);