1:修改页面的图标
2:修改更换实名认证 3:隐藏关系卡 4:房间类型删除 只保留点唱、男神、女神
This commit is contained in:
@@ -424,7 +424,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// // 保持Activity alive,不调用finish()
|
||||
// minimizeToBackground();
|
||||
// }
|
||||
if (mRoomInfoResp!=null) {
|
||||
if (mRoomInfoResp != null) {
|
||||
if (!mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
// 只有在用户主动离开应用时才执行最小化操作
|
||||
if (!userLeaving) {
|
||||
@@ -1162,13 +1162,67 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
if (isFullScreen) {
|
||||
exitFullScreen();
|
||||
} else {
|
||||
enterFullScreen();
|
||||
// enterFullScreen();
|
||||
|
||||
// 修改为横屏展示模式而不是全屏模式
|
||||
enterLandscapeMode();
|
||||
}
|
||||
}
|
||||
private void enterLandscapeMode() {
|
||||
isFullScreen = true;
|
||||
|
||||
// 设置横屏
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
|
||||
if (floatingMagnetView != null) {
|
||||
// 修改Floa组件的布局参数,使其在横屏时占据更大区域
|
||||
ViewGroup.LayoutParams layoutParams = floatingMagnetView.getLayoutParams();
|
||||
if (layoutParams instanceof ConstraintLayout.LayoutParams) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) layoutParams;
|
||||
params.width = ConstraintLayout.LayoutParams.MATCH_CONSTRAINT;
|
||||
params.height = ConstraintLayout.LayoutParams.MATCH_CONSTRAINT;
|
||||
params.horizontalBias = 0.5f;
|
||||
params.verticalBias = 0.5f;
|
||||
floatingMagnetView.setLayoutParams(params);
|
||||
} else {
|
||||
// 如果不是ConstraintLayout.LayoutParams,创建新的
|
||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(
|
||||
ConstraintLayout.LayoutParams.MATCH_CONSTRAINT,
|
||||
ConstraintLayout.LayoutParams.MATCH_CONSTRAINT
|
||||
);
|
||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
floatingMagnetView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
// 可以调整内部fl_screenshare的布局参数
|
||||
FrameLayout flScreenshare = floatingMagnetView.findViewById(R.id.fl_screenshare);
|
||||
ViewGroup.LayoutParams screenParams = flScreenshare.getLayoutParams();
|
||||
if (!(screenParams instanceof FrameLayout.LayoutParams)) {
|
||||
// 如果不是FrameLayout.LayoutParams,创建新的
|
||||
FrameLayout.LayoutParams newScreenParams = new FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
flScreenshare.setLayoutParams(newScreenParams);
|
||||
} else {
|
||||
FrameLayout.LayoutParams newScreenParams = (FrameLayout.LayoutParams) screenParams;
|
||||
newScreenParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
newScreenParams.height = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
flScreenshare.setLayoutParams(newScreenParams);
|
||||
}
|
||||
|
||||
// 显示退出按钮
|
||||
ivQuan.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
private void enterFullScreen() {
|
||||
isFullScreen = true;
|
||||
|
||||
|
||||
|
||||
// 隐藏系统UI
|
||||
View decorView = getWindow().getDecorView();
|
||||
decorView.setSystemUiVisibility(
|
||||
@@ -1194,46 +1248,77 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
safelyMoveViewToParent(fl_screenshare, floatingMagnetView);
|
||||
// 显示全屏容器
|
||||
fullScreenContainer.setVisibility(View.VISIBLE);
|
||||
// floatingMagnetView.setVisibility(View.GONE);
|
||||
floatingMagnetView.setVisibility(View.GONE);
|
||||
ivExitFullscreen.setVisibility(View.VISIBLE); // 显示退出按钮
|
||||
}
|
||||
}
|
||||
|
||||
private void exitFullScreen() {
|
||||
|
||||
isFullScreen = false;
|
||||
// 恢复系统UI
|
||||
View decorView = getWindow().getDecorView();
|
||||
// decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
decorView.setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
);
|
||||
|
||||
// 设置回竖屏
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
|
||||
// 找到 fl_screenshare 并移回原父容器
|
||||
FrameLayout fl_screenshare = findViewById(R.id.fl_screenshare);
|
||||
if (fl_screenshare != null) {
|
||||
safelyMoveViewToParent(fl_screenshare, fullScreenContainer);
|
||||
// ViewParent parent = fl_screenshare.getParent();
|
||||
// if (parent instanceof ViewGroup) {
|
||||
// ((ViewGroup) parent).removeView(fl_screenshare);
|
||||
// }
|
||||
// // 添加到全屏容器
|
||||
// fullScreenContainer.addView(fl_screenshare);
|
||||
// 找到原始父容器并重新添加
|
||||
// FrameLayout originalParent = findViewById(R.id.fullscreen_container); // 或者你实际的容器
|
||||
// if (originalParent != null) {
|
||||
// originalParent.removeView(fl_screenshare); // 防止重复添加
|
||||
// }
|
||||
|
||||
// floatingMagnetView.addView(fl_screenshare);
|
||||
if (floatingMagnetView != null) {
|
||||
// 恢复原始尺寸
|
||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_240),
|
||||
getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_135)
|
||||
);
|
||||
params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID;
|
||||
floatingMagnetView.setLayoutParams(params);
|
||||
|
||||
// 恢复内部fl_screenshare的布局参数
|
||||
FrameLayout flScreenshare = floatingMagnetView.findViewById(R.id.fl_screenshare);
|
||||
FrameLayout.LayoutParams screenParams = new FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
flScreenshare.setLayoutParams(screenParams);
|
||||
}
|
||||
// 恢复界面
|
||||
fullScreenContainer.setVisibility(View.GONE);
|
||||
floatingMagnetView.setVisibility(View.VISIBLE);
|
||||
ivQuan.setVisibility(View.VISIBLE);
|
||||
ivExitFullscreen.setVisibility(View.GONE); // 隐藏退出按钮
|
||||
|
||||
// 隐藏退出按钮
|
||||
ivExitFullscreen.setVisibility(View.GONE);
|
||||
|
||||
|
||||
// isFullScreen = false;
|
||||
// // 恢复系统UI
|
||||
// View decorView = getWindow().getDecorView();
|
||||
//// decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
// decorView.setSystemUiVisibility(
|
||||
// View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
// | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
// );
|
||||
// // 设置回竖屏
|
||||
// setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
|
||||
// // 找到 fl_screenshare 并移回原父容器
|
||||
// FrameLayout fl_screenshare = findViewById(R.id.fl_screenshare);
|
||||
// if (fl_screenshare != null) {
|
||||
// safelyMoveViewToParent(fl_screenshare, fullScreenContainer);
|
||||
//// ViewParent parent = fl_screenshare.getParent();
|
||||
//// if (parent instanceof ViewGroup) {
|
||||
//// ((ViewGroup) parent).removeView(fl_screenshare);
|
||||
//// }
|
||||
//// // 添加到全屏容器
|
||||
//// fullScreenContainer.addView(fl_screenshare);
|
||||
// // 找到原始父容器并重新添加
|
||||
//// FrameLayout originalParent = findViewById(R.id.fullscreen_container); // 或者你实际的容器
|
||||
//// if (originalParent != null) {
|
||||
//// originalParent.removeView(fl_screenshare); // 防止重复添加
|
||||
//// }
|
||||
//
|
||||
//// floatingMagnetView.addView(fl_screenshare);
|
||||
// }
|
||||
// // 恢复界面
|
||||
// fullScreenContainer.setVisibility(View.GONE);
|
||||
// floatingMagnetView.setVisibility(View.VISIBLE);
|
||||
// ivQuan.setVisibility(View.VISIBLE);
|
||||
// ivExitFullscreen.setVisibility(View.GONE); // 隐藏退出按钮
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1471,7 +1556,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
roomFragment.handleMsgType1028(messageEvent);
|
||||
}else if ( msgType == 1058) {
|
||||
} else if (msgType == 1058) {
|
||||
if (roomFragment == null) {
|
||||
roomFragment = RoomFragment.newInstance();
|
||||
getSupportFragmentManager()
|
||||
@@ -2627,8 +2712,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return true ;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,11 +141,11 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
// 添加标题和对应的内容项
|
||||
dataList.add(new RoomSettingBean("房间类型", null, null, null, -1, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("点唱", "ic_sing", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeSing, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("拍卖", "ic_auction", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeAuction, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("男神", "ic_boy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeBoy, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("女神", "ic_girl", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeGirl, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean(" 交友", "jiao_y", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU, read, isSelected, false, false));// 添加的新的房间类型 ,交友 ,是原来的男神女神类型
|
||||
dataList.add(new RoomSettingBean(" 互娱", "ic_jiaoy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy, read, isSelected, false, false)); //原交友,更改互娱 2025年9月19日11:18:01
|
||||
// dataList.add(new RoomSettingBean("拍卖", "ic_auction", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeAuction, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("男神", "ic_boy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeBoy, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("女神", "ic_girl", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeGirl, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean(" 交友", "jiao_y", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU, read, isSelected, false, false));// 添加的新的房间类型 ,交友 ,是原来的男神女神类型
|
||||
// dataList.add(new RoomSettingBean(" 互娱", "ic_jiaoy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy, read, isSelected, false, false)); //原交友,更改互娱 2025年9月19日11:18:01
|
||||
|
||||
|
||||
dataList.add(new RoomSettingBean("常用工具", null, null, null, -1, read, isSelected, false, false));
|
||||
@@ -266,14 +266,14 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
// MvpPre.changeRoomType(roomId, "2");
|
||||
queren("2");
|
||||
}
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy) {
|
||||
//// MvpPre.changeRoomType(roomId, "3");
|
||||
// queren("3");
|
||||
// }
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl) {
|
||||
//// MvpPre.changeRoomType(roomId, "4");
|
||||
// queren("4");
|
||||
// }
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy) {
|
||||
// MvpPre.changeRoomType(roomId, "3");
|
||||
queren("3");
|
||||
}
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl) {
|
||||
// MvpPre.changeRoomType(roomId, "4");
|
||||
queren("4");
|
||||
}
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy) {
|
||||
// MvpPre.changeRoomType(roomId, "7");
|
||||
queren("7");
|
||||
@@ -341,11 +341,13 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
// 房主显示全部
|
||||
if (roleLevel == 1) {
|
||||
if (onMic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction || type==RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy
|
||||
|| type==RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
||||
return false;
|
||||
}
|
||||
}else {
|
||||
if (type==RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
if (type==RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction || type==RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy
|
||||
|| type==RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -357,11 +359,13 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
|
||||
if (onMic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction || type==RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy
|
||||
|| type==RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
||||
return false;
|
||||
}
|
||||
}else {
|
||||
if (type==RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
if (type==RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction || type==RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy
|
||||
|| type==RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -372,7 +376,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
) {
|
||||
return true;
|
||||
}else {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction || type==RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy
|
||||
|| type==RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
setTextViewStyle(mBinding.textView2, false);
|
||||
setTextViewStyle(mBinding.textView1, true);
|
||||
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
||||
mBinding.ll.setVisibility(VISIBLE);
|
||||
mBinding.ll.setVisibility(GONE);
|
||||
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_k);
|
||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.regit_t);
|
||||
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar1(), mBinding.userNav1);
|
||||
@@ -435,7 +435,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
setTextViewStyle(mBinding.textView2, true);
|
||||
setTextViewStyle(mBinding.textView1, false);
|
||||
if (userInfo.getZhenai() != null && !userInfo.getZhenai().equals("")) {
|
||||
mBinding.ll.setVisibility(VISIBLE);
|
||||
mBinding.ll.setVisibility(GONE);
|
||||
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_w);
|
||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guanxiw_z);
|
||||
ImageUtils.loadHeadCC(userInfo.getZhenai().getAvatar1(), mBinding.userNav1);
|
||||
|
||||
@@ -210,8 +210,12 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
|
||||
}
|
||||
});
|
||||
isShow = true;
|
||||
switchMic(2);
|
||||
if (!CommonAppContext.getInstance().isShowAg){
|
||||
switchMic(1);
|
||||
}else {
|
||||
isShow = true;
|
||||
switchMic(2);
|
||||
}
|
||||
|
||||
mBinding.im3.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -344,6 +348,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
AgoraManager.getInstance(getActivity()).setLocalAudioEnabled(true,SpUtil.getUserId()+"");
|
||||
isShow = false;
|
||||
CommonAppContext.getInstance().isShowAg=false;
|
||||
|
||||
} else {
|
||||
mBinding.im1.setImageResource(com.xscm.moduleutil.R.mipmap.op_m);
|
||||
@@ -351,6 +356,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||
AgoraManager.getInstance(getActivity()).setLocalAudioEnabled(false,SpUtil.getUserId()+"");
|
||||
isShow = true;
|
||||
CommonAppContext.getInstance().isShowAg=true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -831,5 +837,6 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
mediaProjection[0].stop();
|
||||
mediaProjection[0] = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,8 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_rl_gift">
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_rl_gift"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
@@ -327,7 +328,8 @@
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:background="@mipmap/guxi_k"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout">
|
||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
|
||||
Reference in New Issue
Block a user