关闭远端声音按钮放到更多菜单
This commit is contained in:
@@ -16,6 +16,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.mango.core.manager.AudioEngineManager;
|
||||
import com.tongdaxing.erban.sadmin.RoomSAdminManagerActivity;
|
||||
import com.mango.moshen.R;
|
||||
import com.mango.moshen.avroom.activity.CreatePKActivity;
|
||||
@@ -121,6 +122,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
addCleanScreenAction(optAdapter);
|
||||
addRoomLimit(optAdapter);
|
||||
addGiftValueAction(optAdapter);
|
||||
addRemoteMuteOptAdapter();
|
||||
addSuperAdminAction(optAdapter);
|
||||
rvOPtList.setAdapter(optAdapter);
|
||||
}
|
||||
@@ -412,7 +414,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
superAdminModel.roomOperate(SuperAdminModel.CLOSE_PUBLIC_SCREEN).subscribe();
|
||||
}
|
||||
AvRoomModel.get().closeScreen(roomInfo.getRoomId(),
|
||||
!isCloseScreen)
|
||||
!isCloseScreen)
|
||||
.compose(RxHelper.bindContext(context))
|
||||
.flatMap(data -> IMNetEaseManager.get().closeOpenScreen(
|
||||
data.getRoomId(), data))
|
||||
@@ -513,6 +515,26 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开关远端声音
|
||||
*/
|
||||
private void addRemoteMuteOptAdapter() {
|
||||
optAdapter.addData(new OptAction(
|
||||
AudioEngineManager.get().isRemoteMute() ? R.drawable.icon_remote_mute_open : R.drawable.icon_remote_mute_close,
|
||||
"扬声器",
|
||||
() -> {
|
||||
boolean isRemoteMute = !AudioEngineManager.get().isRemoteMute();
|
||||
if (isRemoteMute) {
|
||||
if (AvRoomDataManager.get().isCpRoom()) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_CLOSE_SOUND_CLICK, "关闭声音");
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_CLOSE_SOUND_CLICK, "关闭声音");
|
||||
}
|
||||
AudioEngineManager.get().setRemoteMute(isRemoteMute);
|
||||
}));
|
||||
}
|
||||
|
||||
private void handleOpenGiftValue() {
|
||||
boolean isOpen = !AvRoomDataManager.get().isShowGiftValue();
|
||||
GiftValueModel.get().openGiftValue(isOpen)
|
||||
@@ -677,7 +699,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
helper.setText(R.id.tv_name, item.name)
|
||||
.setImageResource(R.id.iv_icon, item.icon)
|
||||
.setTextColor(R.id.tv_name, context.getResources().getColor(
|
||||
item.isAppColor ? R.color.appColor : R.color.white_transparent_50));
|
||||
item.isAppColor ? R.color.appColor : R.color.white));
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
item.onAction.onAction();
|
||||
dismiss();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,14 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/dialog_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_room_operation"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.mango.moshen.ui.widget.TopRoundLinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="#01ffffff"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:realtimeBlurRadius="80dp"
|
||||
app:realtimeDownsampleFactor="1"
|
||||
app:realtimeOverlayColor="#1affffff" />
|
||||
|
||||
</com.mango.moshen.ui.widget.TopRoundLinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_opt_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -18,7 +18,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/white_transparent_50"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="@string/team_admin" />
|
||||
|
||||
|
@@ -68,6 +68,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:gravity="center">
|
||||
|
||||
|
Reference in New Issue
Block a user