diff --git a/common/src/main/res/layout/view_live_total.xml b/common/src/main/res/layout/view_live_total.xml index 5408563cc..58178fddf 100644 --- a/common/src/main/res/layout/view_live_total.xml +++ b/common/src/main/res/layout/view_live_total.xml @@ -207,6 +207,27 @@ android:textColor="#FF9A9A9A" android:textSize="12sp" /> + + + + + + diff --git a/common/src/main/res/mipmap-xxhdpi/live_more_icon_report.png b/common/src/main/res/mipmap-xxhdpi/live_more_icon_report.png new file mode 100644 index 000000000..914b4cfae Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/live_more_icon_report.png differ diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 9c84145ca..22166c9b8 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -624,6 +624,7 @@ public class LiveAudienceActivity extends LiveActivity { break; case BOTTOM_COLLECTION: LiveTotalDialog liveTotalDialog = new LiveTotalDialog(); + liveTotalDialog.setAnchorBean(mLiveBean); liveTotalDialog.show(getSupportFragmentManager(), "LiveTotalDialog"); break; case GIFT_POPUP: @@ -767,6 +768,9 @@ public class LiveAudienceActivity extends LiveActivity { // verticalViewPager.setCurrentItem(0); getDrawer(); break; + case REPORT: + LiveReportActivity.forward(mContext, event.getBean().getUid()); + break; } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java index 5d0e6170b..81850c1b7 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveTotalDialog.java @@ -15,8 +15,8 @@ import com.yunbao.common.dialog.AbsDialogFragment; 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 com.yunbao.live.bean.LiveBean; import com.yunbao.live.event.LiveAudienceEvent; import org.greenrobot.eventbus.Subscribe; @@ -30,6 +30,7 @@ import java.util.List; public class LiveTotalDialog extends AbsDialogFragment { private RecyclerView funGamesList; private FunGamesAdapter gamesAdapter; + private LiveBean anchorBean;//主播bean @Override protected int getLayoutId() { @@ -46,6 +47,10 @@ public class LiveTotalDialog extends AbsDialogFragment { return true; } + public void setAnchorBean(LiveBean anchorBean) { + this.anchorBean = anchorBean; + } + @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); @@ -109,11 +114,18 @@ public class LiveTotalDialog extends AbsDialogFragment { } ); //活动中心 - ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.activity_center),()->{ + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.activity_center), () -> { Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.ACTIVITY_CENTER)); dismiss(); }); + //举报 + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.report_layout), () -> { + Bus.get().post(new LiveAudienceEvent() + .setBean(anchorBean) + .setType(LiveAudienceEvent.LiveAudienceType.REPORT)); + dismiss(); + }); } @Override diff --git a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java index 0626a282d..abd971209 100644 --- a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java +++ b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java @@ -113,7 +113,8 @@ public class LiveAudienceEvent extends BaseModel { OPEN_PARAMETERS(12, "开放参数"), ACTIVITY_CENTER(13, "活動中心"), LIVE_ROOM_EXCEPTION(14, "直播间异常"), - REFRESH_THE_LIVEl_PAGE(15, "刷新直播页面"); + REFRESH_THE_LIVEl_PAGE(15, "刷新直播页面"), + REPORT(16, "舉報"); private int type; private String name;