From f55e9c0cfe8fe75d62cb8da92bf1c8ddd87f9374 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 8 Jul 2023 13:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/adapter/LiveChatAdapter.java | 5 ++- .../live/dialog/ResultRendPacketPopup.java | 38 ++++++++++++------- live/src/main/res/layout/item_live_chat.xml | 11 +++--- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 163f7a99e..60177c90e 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -27,6 +27,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -203,7 +204,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { View v_chat_active_close; RecyclerView rv_chat_active; ImageView img_zg_img, btnAttention, textLeave; - LinearLayout attentionLayout; + FrameLayout attentionLayout; ClipPathCircleImage clipImage2; public Vh(View itemView) { @@ -211,7 +212,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { mBg = (LinearLayout) itemView.findViewById(R.id.bg); mTextView = (TextView) itemView.findViewById(R.id.text_txt); textTxt2 = (TextView) itemView.findViewById(R.id.text_txt2); - attentionLayout = (LinearLayout) itemView.findViewById(R.id.attention_layout); + attentionLayout = (FrameLayout) itemView.findViewById(R.id.attention_layout); clipImage2 = (ClipPathCircleImage) itemView.findViewById(R.id.clip_image2); itemView.setOnClickListener(mOnClickListener); diff --git a/live/src/main/java/com/yunbao/live/dialog/ResultRendPacketPopup.java b/live/src/main/java/com/yunbao/live/dialog/ResultRendPacketPopup.java index 8c592072e..5e3b48bdf 100644 --- a/live/src/main/java/com/yunbao/live/dialog/ResultRendPacketPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/ResultRendPacketPopup.java @@ -105,13 +105,18 @@ public class ResultRendPacketPopup extends CenterPopupView { new HttpCallback>() { @Override public void onSuccess(List data) { -// if (data.size() > 0) { - new XPopup.Builder(getContext()) - .asCustom(new LuckUserRedPacketPopup(getContext(), data)) - .show(); -// } else { -// ToastUtil.show(R.string.no_data); -// } + if (data.size() > 0) { + new XPopup.Builder(getContext()) + .asCustom(new LuckUserRedPacketPopup(getContext(), data)) + .show(); + } else { + new XPopup.Builder(getContext()) + .asCustom(new ResultRendPacketPopup(getContext(), + true, + redPacketInfoModel, + isSuperJackpot)) + .show(); + } } @@ -126,13 +131,18 @@ public class ResultRendPacketPopup extends CenterPopupView { new HttpCallback>() { @Override public void onSuccess(List data) { -// if (data.size() > 0) { - new XPopup.Builder(getContext()) - .asCustom(new LuckUserRedPacketPopup(getContext(), data)) - .show(); -// } else { -// ToastUtil.show(R.string.no_data); -// } + if (data.size() > 0) { + new XPopup.Builder(getContext()) + .asCustom(new LuckUserRedPacketPopup(getContext(), data)) + .show(); + } else { + new XPopup.Builder(getContext()) + .asCustom(new ResultRendPacketPopup(getContext(), + true, + redPacketInfoModel, + isSuperJackpot)) + .show(); + } } diff --git a/live/src/main/res/layout/item_live_chat.xml b/live/src/main/res/layout/item_live_chat.xml index e25de6622..8f08140de 100644 --- a/live/src/main/res/layout/item_live_chat.xml +++ b/live/src/main/res/layout/item_live_chat.xml @@ -181,7 +181,7 @@ android:layout_height="45dp" /> - - +