add:直播间工具合集新增举报按钮

This commit is contained in:
zlzw 2022-09-01 13:28:30 +08:00
parent 161306de30
commit 43ac37b9e9
5 changed files with 41 additions and 3 deletions

View File

@ -207,6 +207,27 @@
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/report_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/live_more_icon_report" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/report"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -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;
}

View File

@ -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

View File

@ -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;