fix bugs.11
This commit is contained in:
@@ -4,10 +4,13 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 后台定位权限(Android 10+) -->
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<application android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".TransparentActivity"
|
||||
android:theme="@style/TransparentActivityTheme"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.TotalRevenueActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xscm.modulemain
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
|
||||
class TransparentActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_transparent)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
10
MainModule/src/main/res/layout/activity_transparent.xml
Normal file
10
MainModule/src/main/res/layout/activity_transparent.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".TransparentActivity">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -13,8 +13,8 @@
|
||||
android:clipToPadding="false">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/room_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
@@ -24,14 +24,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_nobility"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/container"
|
||||
app:layout_constraintEnd_toEndOf="@id/container"
|
||||
app:layout_constraintStart_toStartOf="@id/container"
|
||||
app:layout_constraintTop_toTopOf="@id/container" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user