fix bugs.11
This commit is contained in:
@@ -215,7 +215,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
tzblChanged();//获取在线列表数据
|
||||
RoomPitBean roomPitBean2 = wheatView.pitBean;
|
||||
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")) {
|
||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "") && !wheatView2.getUserId().isEmpty()) {
|
||||
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).upVisibility(true);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Spannable;
|
||||
@@ -20,7 +21,9 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.TransparentActivity;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.databinding.FragmentRoomBinding;
|
||||
import com.xscm.modulemain.dialog.RoomUserInfoFragment;
|
||||
@@ -158,10 +161,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
// 释放SVGA动画资源
|
||||
if (mBinding != null && mBinding.svgaNobility != null) {
|
||||
mBinding.svgaNobility.release();
|
||||
}
|
||||
releaseAllResources();
|
||||
}
|
||||
|
||||
@@ -437,7 +436,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
|
||||
if (newFragment != null) {
|
||||
switchFragment(newFragment, mBinding.container.getId());
|
||||
switchFragment(newFragment, mBinding.roomItem.getId());
|
||||
} else {
|
||||
LogUtils.e("newFragment==null");
|
||||
}
|
||||
@@ -451,28 +450,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
||||
ConstraintLayout.LayoutParams.WRAP_CONTENT
|
||||
);
|
||||
mBinding.container.setLayoutParams(params);
|
||||
// if (mRoomInfoResp?.room_info?.type_id == "1" || mRoomInfoResp?.room_info?.type_id == "3" || mRoomInfoResp?.room_info?.type_id == "4"
|
||||
// || mRoomInfoResp?.room_info?.type_id == "8"
|
||||
// ) {
|
||||
// maxHeightDp = if (mRoomInfoResp?.room_info?.label_id == "1") {
|
||||
// 333
|
||||
// } else {
|
||||
// 287
|
||||
// }
|
||||
// } else if (mRoomInfoResp?.room_info?.type_id == "2") {
|
||||
// maxHeightDp = 297
|
||||
// }
|
||||
// if (mRoomInfoResp?.room_info?.type_id == "6") {
|
||||
// maxHeightDp = 453
|
||||
// } else if (mRoomInfoResp?.room_info?.type_id == "7") {
|
||||
// maxHeightDp = 373
|
||||
// } else if (mRoomInfoResp!!.room_info.type_id == "9") {
|
||||
// maxHeightDp = 373
|
||||
// } else if (mRoomInfoResp!!.room_info.type_id == "10") {
|
||||
// maxHeightDp = 333
|
||||
// }
|
||||
// adjustLayoutHeights()
|
||||
mBinding.roomItem.setLayoutParams(params);
|
||||
}
|
||||
|
||||
/// 这是在进入电影放的时候,隐藏下面的和排麦视图
|
||||
@@ -488,12 +466,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
private void switchFragment(Fragment newFragment, int containerId) {
|
||||
if (!isAdded() || newFragment == null) return;
|
||||
|
||||
LogUtils.e("switchFragment attachA");
|
||||
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
|
||||
|
||||
// 1. 添加新 Fragment
|
||||
if (!newFragment.isAdded()) {
|
||||
ft.add(containerId, newFragment, newFragment.getClass().getSimpleName());
|
||||
ft.add(containerId, newFragment);
|
||||
} else if (newFragment.getView() == null) {
|
||||
ft.attach(newFragment); // 确保 view 被创建
|
||||
LogUtils.e("switchFragment attach");
|
||||
@@ -510,6 +488,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
ft.commitNowAllowingStateLoss(); // 立即提交
|
||||
|
||||
currentFragment = newFragment;
|
||||
|
||||
startActivity(new Intent(ActivityUtils.getTopActivity(), TransparentActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user