From 6d22c6a066fc79830d20ed5a6aa8d0ed4af43da2 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 17 Aug 2022 15:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B2=89=E4=B8=9D=EF=BC=8C?= =?UTF-8?q?=E5=AE=88=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/adapter/FunGamesAdapter.java | 1 + .../yunbao/common/dialog/LiveTotalDialog.java | 17 ++++++++++ .../common/event/LiveAudienceEvent.java | 4 ++- .../src/main/res/layout/view_live_total.xml | 2 ++ .../live/activity/LiveAudienceActivity.java | 31 +++++++++++++++++++ live/src/main/res/layout/dialog_fans.xml | 16 +++++----- 6 files changed, 63 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/adapter/FunGamesAdapter.java b/common/src/main/java/com/yunbao/common/adapter/FunGamesAdapter.java index f74361143..575baaa88 100644 --- a/common/src/main/java/com/yunbao/common/adapter/FunGamesAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/FunGamesAdapter.java @@ -47,4 +47,5 @@ public class FunGamesAdapter extends RecyclerView.Adapter { activeModels.addAll(mActiveModels); notifyDataSetChanged(); } + } diff --git a/common/src/main/java/com/yunbao/common/dialog/LiveTotalDialog.java b/common/src/main/java/com/yunbao/common/dialog/LiveTotalDialog.java index 38001f978..461c09d44 100644 --- a/common/src/main/java/com/yunbao/common/dialog/LiveTotalDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/LiveTotalDialog.java @@ -11,9 +11,12 @@ import androidx.recyclerview.widget.RecyclerView; import com.yunbao.common.R; import com.yunbao.common.adapter.FunGamesAdapter; import com.yunbao.common.bean.ActiveModel; +import com.yunbao.common.event.LiveAudienceEvent; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; import java.util.List; @@ -59,6 +62,20 @@ public class LiveTotalDialog extends AbsDialogFragment { ToastUtil.show(error); } }); + //粉丝团 + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.fan_club), () -> { + Bus.get().post(new LiveAudienceEvent() + .setType(LiveAudienceEvent.LiveAudienceType.FANCLUB)); + dismiss(); + } + ); + //守护 + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_layout), () -> { + Bus.get().post(new LiveAudienceEvent() + .setType(LiveAudienceEvent.LiveAudienceType.GUARD)); + dismiss(); + } + ); } diff --git a/common/src/main/java/com/yunbao/common/event/LiveAudienceEvent.java b/common/src/main/java/com/yunbao/common/event/LiveAudienceEvent.java index 9d7260f34..4513540b7 100644 --- a/common/src/main/java/com/yunbao/common/event/LiveAudienceEvent.java +++ b/common/src/main/java/com/yunbao/common/event/LiveAudienceEvent.java @@ -29,7 +29,9 @@ public class LiveAudienceEvent extends BaseModel { SIDEBAR(1, "侧边栏"), BOTTOMCOLLECTION(2, "底部合集"), GIFTPOPUP(3, "礼物弹窗"), - CURRENTACTIVITY(4, "当前活动"); + CURRENTACTIVITY(4, "当前活动"), + FANCLUB(5,"粉絲團"), + GUARD(6,"守護"); private int type; diff --git a/common/src/main/res/layout/view_live_total.xml b/common/src/main/res/layout/view_live_total.xml index aed38e3c2..2adc652ca 100644 --- a/common/src/main/res/layout/view_live_total.xml +++ b/common/src/main/res/layout/view_live_total.xml @@ -37,6 +37,7 @@ android:layout_marginTop="10dp"> - + android:orientation="vertical" + app:cardCornerRadius="12dp" + app:cardElevation="16dp"> + - - \ No newline at end of file + android:layout_height="match_parent" + android:layout_gravity="top" /> + \ No newline at end of file