添加跳转动画
This commit is contained in:
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,15 +0,0 @@
|
|||||||
*.iml
|
|
||||||
.gradle
|
|
||||||
/local.properties
|
|
||||||
/.idea/caches
|
|
||||||
/.idea/libraries
|
|
||||||
/.idea/modules.xml
|
|
||||||
/.idea/workspace.xml
|
|
||||||
/.idea/navEditor.xml
|
|
||||||
/.idea/assetWizardSettings.xml
|
|
||||||
.DS_Store
|
|
||||||
/build
|
|
||||||
/captures
|
|
||||||
.externalNativeBuild
|
|
||||||
.cxx
|
|
||||||
local.properties
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
|
||||||
<module name="羽声.app" />
|
|
||||||
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
|
|
||||||
<option name="DEPLOY" value="true" />
|
|
||||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="true" />
|
|
||||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
|
||||||
<option name="ARTIFACT_NAME" value="" />
|
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
|
||||||
<option name="ALL_USERS" value="false" />
|
|
||||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
|
||||||
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
|
|
||||||
<option name="CLEAR_APP_STORAGE" value="false" />
|
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
|
||||||
<option name="MODE" value="default_activity" />
|
|
||||||
<option name="RESTORE_ENABLED" value="false" />
|
|
||||||
<option name="RESTORE_FILE" value="" />
|
|
||||||
<option name="RESTORE_FRESH_INSTALL_ONLY" value="true" />
|
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
|
||||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
|
||||||
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
|
|
||||||
<option name="DEBUGGER_TYPE" value="Java" />
|
|
||||||
<Java>
|
|
||||||
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
|
||||||
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
|
||||||
</Java>
|
|
||||||
<Profilers>
|
|
||||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
|
|
||||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
|
||||||
</Profilers>
|
|
||||||
<option name="DEEP_LINK" value="" />
|
|
||||||
<option name="ACTIVITY" value="" />
|
|
||||||
<option name="ACTIVITY_CLASS" value="" />
|
|
||||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
|
||||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@@ -175,7 +175,6 @@
|
|||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:screenOrientation="behind"
|
|
||||||
android:theme="@style/authsdk_activity_dialog" />
|
android:theme="@style/authsdk_activity_dialog" />
|
||||||
|
|
||||||
<!-- <activity-->
|
<!-- <activity-->
|
||||||
@@ -198,9 +197,6 @@
|
|||||||
android:name=".wxapi.WXPayEntryActivity"
|
android:name=".wxapi.WXPayEntryActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop" />
|
android:launchMode="singleTop" />
|
||||||
<activity
|
|
||||||
android:name="com.example.modulevocal.activity.RealNameActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".PasswordLoginActivity"
|
android:name=".PasswordLoginActivity"
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import com.xscm.moduleutil.activity.IPresenter;
|
|||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@author qx
|
*@author qx
|
||||||
@@ -72,6 +74,11 @@ public abstract class BaseMvpDialogFragment<P extends IPresenter, VDM extends Vi
|
|||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onEvent(Object event){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void initArgs(Bundle arguments) {
|
public void initArgs(Bundle arguments) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.xscm.moduleutil.bean.room;
|
package com.xscm.moduleutil.bean.room;
|
||||||
|
|
||||||
|
|
||||||
|
import com.xscm.moduleutil.BaseEvent;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class RoomUpPitBean {
|
public class RoomUpPitBean extends BaseEvent {
|
||||||
private String id;
|
private String id;
|
||||||
private String room_id;
|
private String room_id;
|
||||||
private String user_id;
|
private String user_id;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.xscm.moduleutil.bean.room;
|
package com.xscm.moduleutil.bean.room;
|
||||||
|
|
||||||
|
import com.xscm.moduleutil.BaseEvent;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -7,7 +9,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class RoomUserJoinModel {
|
public class RoomUserJoinModel extends BaseEvent {
|
||||||
|
|
||||||
private String room_id;
|
private String room_id;
|
||||||
private String user_id;
|
private String user_id;
|
||||||
|
|||||||
@@ -343,15 +343,6 @@ public class MessageListenerSingleton {
|
|||||||
joinLatch.countDown();
|
joinLatch.countDown();
|
||||||
// 标记房间已加入
|
// 标记房间已加入
|
||||||
markRoomJoined(roomId);
|
markRoomJoined(roomId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // 发送加入成功的事件
|
|
||||||
// mainHandler.post(() -> {
|
|
||||||
// RoomMessageEvent.T t = new RoomMessageEvent.T();
|
|
||||||
// t.setText("成功加入房间");
|
|
||||||
// notifyMessageReceived(new RoomMessageEvent(1000, roomId, t));
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public enum EnvironmentEnum {
|
|||||||
"midi01",
|
"midi01",
|
||||||
"https://midi01.oss-cn-beijing.aliyuncs.com/",
|
"https://midi01.oss-cn-beijing.aliyuncs.com/",
|
||||||
"wxc7681513be9f926b",
|
"wxc7681513be9f926b",
|
||||||
1600096890,
|
1600106397,
|
||||||
"02f7339ec98947deaeab173599891932",
|
"02f7339ec98947deaeab173599891932",
|
||||||
"tcp://1.13.181.248",
|
"tcp://1.13.181.248",
|
||||||
"https://tmd.xscmmidi.site/h5");
|
"https://tmd.xscmmidi.site/h5");
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 后台定位权限(Android 10+) -->
|
<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.ACCESS_BACKGROUND_LOCATION" />
|
||||||
|
|
||||||
<application>
|
<application
|
||||||
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.login.activity.SwitchAccountsActivity"
|
android:name=".activity.login.activity.SwitchAccountsActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -21,7 +22,6 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.main.activity.MainActivity"
|
android:name=".activity.main.activity.MainActivity"
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:configChanges="fontScale" />
|
android:configChanges="fontScale" />
|
||||||
|
|
||||||
|
|
||||||
@@ -30,11 +30,10 @@
|
|||||||
android:alwaysRetainTaskState="true"
|
android:alwaysRetainTaskState="true"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
android:enableOnBackInvokedCallback="false"
|
android:enableOnBackInvokedCallback="false"
|
||||||
android:excludeFromRecents="false"
|
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/TransparentActivityTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -1010,8 +1010,9 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void toActivity(Class<?> clazz){
|
public void singleTaskToActivity(Class<?> clazz){
|
||||||
Intent intent = new Intent(this, clazz);
|
Intent intent = new Intent(this, clazz);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
startActivity( intent);
|
startActivity( intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Route(path = ARouteConstants.ME)
|
|
||||||
public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBinding>
|
public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBinding>
|
||||||
implements HomeContacts.View, View.OnClickListener, LocationProvider.LocationCallback {
|
implements HomeContacts.View, View.OnClickListener, LocationProvider.LocationCallback {
|
||||||
private static int index = -1;
|
private static int index = -1;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.Manifest
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.ActivityManager
|
import android.app.ActivityManager
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
|
import android.app.ComponentCaller
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -11,13 +12,23 @@ import android.content.pm.ActivityInfo
|
|||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.os.*
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.CountDownTimer
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.text.Spannable
|
import android.text.Spannable
|
||||||
import android.text.SpannableStringBuilder
|
import android.text.SpannableStringBuilder
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.text.style.ForegroundColorSpan
|
import android.text.style.ForegroundColorSpan
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.*
|
import android.view.GestureDetector
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.KeyEvent
|
||||||
|
import android.view.MotionEvent
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.view.WindowManager
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
@@ -32,12 +43,12 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||||||
import com.alibaba.android.arouter.facade.annotation.Autowired
|
import com.alibaba.android.arouter.facade.annotation.Autowired
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.alibaba.android.arouter.launcher.ARouter
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
|
import com.blankj.utilcode.util.ActivityUtils
|
||||||
import com.blankj.utilcode.util.GsonUtils
|
import com.blankj.utilcode.util.GsonUtils
|
||||||
import com.blankj.utilcode.util.LogUtils
|
import com.blankj.utilcode.util.LogUtils
|
||||||
import com.blankj.utilcode.util.ThreadUtils
|
import com.blankj.utilcode.util.ThreadUtils
|
||||||
import com.blankj.utilcode.util.TimeUtils
|
import com.blankj.utilcode.util.TimeUtils
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.xscm.modulemain.dialog.*
|
|
||||||
import com.hjq.toast.ToastUtils
|
import com.hjq.toast.ToastUtils
|
||||||
import com.liulishuo.okdownload.OkDownloadProvider
|
import com.liulishuo.okdownload.OkDownloadProvider
|
||||||
import com.orhanobut.logger.Logger
|
import com.orhanobut.logger.Logger
|
||||||
@@ -47,7 +58,9 @@ import com.tencent.imsdk.v2.V2TIMManager
|
|||||||
import com.tencent.imsdk.v2.V2TIMSDKListener
|
import com.tencent.imsdk.v2.V2TIMSDKListener
|
||||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo
|
import com.tencent.imsdk.v2.V2TIMUserFullInfo
|
||||||
import com.tencent.imsdk.v2.V2TIMValueCallback
|
import com.tencent.imsdk.v2.V2TIMValueCallback
|
||||||
|
import com.xscm.modulemain.BaseMvpActivity
|
||||||
import com.xscm.modulemain.R
|
import com.xscm.modulemain.R
|
||||||
|
import com.xscm.modulemain.activity.main.activity.MainActivity
|
||||||
import com.xscm.modulemain.activity.room.contacts.RoomContacts
|
import com.xscm.modulemain.activity.room.contacts.RoomContacts
|
||||||
import com.xscm.modulemain.activity.room.fragment.PublicScreenEaseChatFragment
|
import com.xscm.modulemain.activity.room.fragment.PublicScreenEaseChatFragment
|
||||||
import com.xscm.modulemain.activity.room.fragment.RedEnvelopesFragment
|
import com.xscm.modulemain.activity.room.fragment.RedEnvelopesFragment
|
||||||
@@ -58,8 +71,10 @@ import com.xscm.modulemain.activity.room.fragment.RoomNoticeDialogFragment
|
|||||||
import com.xscm.modulemain.activity.room.fragment.RoomPasswordSetDialogFragment
|
import com.xscm.modulemain.activity.room.fragment.RoomPasswordSetDialogFragment
|
||||||
import com.xscm.modulemain.activity.room.presenter.RoomPresenter
|
import com.xscm.modulemain.activity.room.presenter.RoomPresenter
|
||||||
import com.xscm.modulemain.databinding.ActivityRoomBinding
|
import com.xscm.modulemain.databinding.ActivityRoomBinding
|
||||||
|
import com.xscm.modulemain.dialog.EmotionPickerDialog
|
||||||
import com.xscm.modulemain.dialog.ExitRoomBottomSheet
|
import com.xscm.modulemain.dialog.ExitRoomBottomSheet
|
||||||
import com.xscm.modulemain.dialog.FriendsDialogFragment
|
import com.xscm.modulemain.dialog.FriendsDialogFragment
|
||||||
|
import com.xscm.modulemain.dialog.GiftLotteryDialog
|
||||||
import com.xscm.modulemain.dialog.HourlyChartDialog
|
import com.xscm.modulemain.dialog.HourlyChartDialog
|
||||||
import com.xscm.modulemain.dialog.PublishCommentDialogFragment
|
import com.xscm.modulemain.dialog.PublishCommentDialogFragment
|
||||||
import com.xscm.modulemain.dialog.RedBagSendDialog
|
import com.xscm.modulemain.dialog.RedBagSendDialog
|
||||||
@@ -71,33 +86,58 @@ import com.xscm.modulemain.dialog.RoomOnlineDialogFragment
|
|||||||
import com.xscm.modulemain.dialog.RoomPkDialogFragment
|
import com.xscm.modulemain.dialog.RoomPkDialogFragment
|
||||||
import com.xscm.modulemain.dialog.RoomSettingFragment
|
import com.xscm.modulemain.dialog.RoomSettingFragment
|
||||||
import com.xscm.modulemain.dialog.SoundEffectsDialogFragment
|
import com.xscm.modulemain.dialog.SoundEffectsDialogFragment
|
||||||
|
import com.xscm.modulemain.dialog.TourClubDialogFragment
|
||||||
|
import com.xscm.modulemain.manager.RoomManager
|
||||||
import com.xscm.modulemain.service.ForegroundService
|
import com.xscm.modulemain.service.ForegroundService
|
||||||
import com.xscm.modulemain.service.RoomPlayService
|
import com.xscm.modulemain.service.RoomPlayService
|
||||||
import com.xscm.modulemain.BaseMvpActivity
|
import com.xscm.moduleutil.BaseEvent
|
||||||
import com.xscm.modulemain.activity.main.activity.MainActivity
|
|
||||||
import com.xscm.moduleutil.adapter.CommonPageAdapter
|
import com.xscm.moduleutil.adapter.CommonPageAdapter
|
||||||
import com.xscm.moduleutil.adapter.LikeUserAdapter
|
import com.xscm.moduleutil.adapter.LikeUserAdapter
|
||||||
import com.xscm.moduleutil.base.AppStateListener
|
import com.xscm.moduleutil.base.AppStateListener
|
||||||
import com.xscm.moduleutil.base.AppStateManager
|
import com.xscm.moduleutil.base.AppStateManager
|
||||||
import com.xscm.moduleutil.base.CommonAppContext
|
import com.xscm.moduleutil.base.CommonAppContext
|
||||||
import com.xscm.moduleutil.bean.*
|
import com.xscm.moduleutil.bean.GiftBean
|
||||||
|
import com.xscm.moduleutil.bean.HeadlineBean
|
||||||
|
import com.xscm.moduleutil.bean.MqttXlhEnd
|
||||||
|
import com.xscm.moduleutil.bean.RedPacketInfo
|
||||||
|
import com.xscm.moduleutil.bean.RoomCharmRankBean
|
||||||
|
import com.xscm.moduleutil.bean.RoomInputEvent
|
||||||
|
import com.xscm.moduleutil.bean.RoomMessageEvent
|
||||||
import com.xscm.moduleutil.bean.RoomMessageEvent.T
|
import com.xscm.moduleutil.bean.RoomMessageEvent.T
|
||||||
import com.xscm.moduleutil.bean.RoomMessageEvent.text
|
import com.xscm.moduleutil.bean.RoomMessageEvent.text
|
||||||
import com.xscm.moduleutil.bean.room.*
|
import com.xscm.moduleutil.bean.RoomSettingEvent
|
||||||
|
import com.xscm.moduleutil.bean.RoomSingleton
|
||||||
|
import com.xscm.moduleutil.bean.UserInfo
|
||||||
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean
|
||||||
|
import com.xscm.moduleutil.bean.XLHBean
|
||||||
import com.xscm.moduleutil.bean.room.FriendInfo.HeartList
|
import com.xscm.moduleutil.bean.room.FriendInfo.HeartList
|
||||||
|
import com.xscm.moduleutil.bean.room.FriendUserBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomAuction
|
||||||
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionListBean
|
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionListBean
|
||||||
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionUserBean
|
import com.xscm.moduleutil.bean.room.RoomAuction.AuctionUserBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomInfoResp
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomOnline
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomOnlineBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomOwnerBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomUserBean
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils
|
||||||
import com.xscm.moduleutil.dialog.ConfirmDialog
|
import com.xscm.moduleutil.dialog.ConfirmDialog
|
||||||
import com.xscm.moduleutil.dialog.RechargeDialogFragment
|
import com.xscm.moduleutil.dialog.RechargeDialogFragment
|
||||||
import com.xscm.modulemain.dialog.GiftLotteryDialog
|
|
||||||
import com.xscm.modulemain.dialog.TourClubDialogFragment
|
|
||||||
import com.xscm.modulemain.manager.RoomManager
|
|
||||||
import com.xscm.moduleutil.BaseEvent
|
|
||||||
import com.xscm.moduleutil.enumType.QXRoomSeatViewType
|
import com.xscm.moduleutil.enumType.QXRoomSeatViewType
|
||||||
import com.xscm.moduleutil.enumType.RedEnvelopeStatus
|
import com.xscm.moduleutil.enumType.RedEnvelopeStatus
|
||||||
import com.xscm.moduleutil.event.*
|
import com.xscm.moduleutil.event.ColoseCardEvent
|
||||||
|
import com.xscm.moduleutil.event.EffectEvent
|
||||||
|
import com.xscm.moduleutil.event.MusicEvent
|
||||||
|
import com.xscm.moduleutil.event.RoomGiftGiveEvent
|
||||||
|
import com.xscm.moduleutil.event.RoomInputHideEvent
|
||||||
|
import com.xscm.moduleutil.event.RoomJoinMountModel
|
||||||
|
import com.xscm.moduleutil.event.RoomOutEvent
|
||||||
|
import com.xscm.moduleutil.event.RoomTaskEvent
|
||||||
import com.xscm.moduleutil.event.RoomWheatEvent
|
import com.xscm.moduleutil.event.RoomWheatEvent
|
||||||
|
import com.xscm.moduleutil.event.SurfaceEvent
|
||||||
|
import com.xscm.moduleutil.event.UnreadCountEvent
|
||||||
import com.xscm.moduleutil.http.BaseObserver
|
import com.xscm.moduleutil.http.BaseObserver
|
||||||
import com.xscm.moduleutil.http.RetrofitClient
|
import com.xscm.moduleutil.http.RetrofitClient
|
||||||
import com.xscm.moduleutil.interfaces.OnMusicItemClickListener
|
import com.xscm.moduleutil.interfaces.OnMusicItemClickListener
|
||||||
@@ -106,9 +146,18 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton.OnMessageReceivedLi
|
|||||||
import com.xscm.moduleutil.rtc.AgoraManager
|
import com.xscm.moduleutil.rtc.AgoraManager
|
||||||
import com.xscm.moduleutil.rtc.MusicPlayBean
|
import com.xscm.moduleutil.rtc.MusicPlayBean
|
||||||
import com.xscm.moduleutil.service.MyRoomSingleton
|
import com.xscm.moduleutil.service.MyRoomSingleton
|
||||||
import com.xscm.moduleutil.utils.*
|
import com.xscm.moduleutil.utils.ARouteConstants
|
||||||
|
import com.xscm.moduleutil.utils.ColorManager
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils
|
||||||
|
import com.xscm.moduleutil.utils.QXRedPacketManager
|
||||||
|
import com.xscm.moduleutil.utils.SpUtil
|
||||||
|
import com.xscm.moduleutil.utils.SystemUtils
|
||||||
import com.xscm.moduleutil.utils.roomview.GiftDisplayManager
|
import com.xscm.moduleutil.utils.roomview.GiftDisplayManager
|
||||||
import com.xscm.moduleutil.widget.*
|
import com.xscm.moduleutil.widget.CircularProgressView
|
||||||
|
import com.xscm.moduleutil.widget.CustomMusicFloatingView
|
||||||
|
import com.xscm.moduleutil.widget.QXGiftPlayerManager
|
||||||
|
import com.xscm.moduleutil.widget.SilentCountDownTimer
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils
|
||||||
import com.xscm.moduleutil.widget.ViewUtils.OnViewCreatedListener
|
import com.xscm.moduleutil.widget.ViewUtils.OnViewCreatedListener
|
||||||
import com.xscm.moduleutil.widget.floatingView.Floa
|
import com.xscm.moduleutil.widget.floatingView.Floa
|
||||||
import io.agora.musiccontentcenter.Music
|
import io.agora.musiccontentcenter.Music
|
||||||
@@ -124,7 +173,8 @@ import pub.devrel.easypermissions.EasyPermissions
|
|||||||
import pub.devrel.easypermissions.EasyPermissions.PermissionCallbacks
|
import pub.devrel.easypermissions.EasyPermissions.PermissionCallbacks
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import java.util.*
|
import java.util.Arrays
|
||||||
|
import java.util.Date
|
||||||
import java.util.stream.Collectors
|
import java.util.stream.Collectors
|
||||||
|
|
||||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||||
@@ -188,6 +238,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
private var qxRedPacketManager: QXRedPacketManager? = null
|
private var qxRedPacketManager: QXRedPacketManager? = null
|
||||||
|
|
||||||
|
|
||||||
|
override fun onNewIntent(intent: Intent, caller: ComponentCaller) {
|
||||||
|
super.onNewIntent(intent, caller)
|
||||||
|
LogUtils.e("RoomActivity", "onNewIntent")
|
||||||
|
}
|
||||||
|
|
||||||
// 添加弹框到管理列表
|
// 添加弹框到管理列表
|
||||||
fun addActiveDialog(dialog: DialogInterface) {
|
fun addActiveDialog(dialog: DialogInterface) {
|
||||||
activeDialogs.add(dialog)
|
activeDialogs.add(dialog)
|
||||||
@@ -202,7 +257,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
password = intent.getStringExtra("password")
|
password = intent.getStringExtra("password")
|
||||||
roomId = intent.getStringExtra("roomId")
|
roomId = intent.getStringExtra("roomId")
|
||||||
mRoomInfoResp = intent.getSerializableExtra("roomInfo") as RoomInfoResp?
|
mRoomInfoResp = intent.getSerializableExtra("roomInfo") as RoomInfoResp?
|
||||||
LogUtils.dTag("RoomActivity", "doDone" + mRoomInfoResp.toString())
|
LogUtils.dTag("RoomActivit", "doDone" + mRoomInfoResp.toString())
|
||||||
taskId = intent.getStringExtra("taskId")
|
taskId = intent.getStringExtra("taskId")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +503,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
Log.d("TAG", "=== onDestroy called ===");
|
LogUtils.e("RoomActivity", "onDestroy")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@@ -899,16 +954,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var giftGiveEvent: RoomGiftGiveEvent? = null
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun roomGiveGiftEvent(event: RoomGiftGiveEvent?) {
|
|
||||||
if (isFinishing || event == null || event.roonGiftModel == null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
giftGiveEvent = event
|
|
||||||
showGiftGiveProgress()
|
|
||||||
}
|
|
||||||
|
|
||||||
private var giftProgress = 0
|
private var giftProgress = 0
|
||||||
private var giftCountTimer: CountDownTimer? = null
|
private var giftCountTimer: CountDownTimer? = null
|
||||||
@@ -1400,35 +1446,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun onMessageEvent(messageEvent: MqttXlhEnd) {
|
|
||||||
val xlhBean: XLHBean =
|
|
||||||
GsonUtils.fromJson<XLHBean>(messageEvent.message, XLHBean::class.java)
|
|
||||||
if (xlhBean.from_type == 100) {
|
|
||||||
if (xlhBean.xlh_data != null) {
|
|
||||||
if (xlhBean.xlh_data.status == 1) {
|
|
||||||
mBinding?.xlhRk?.visibility = View.VISIBLE
|
|
||||||
xlhDjs(xlhBean.xlh_data.end_time)
|
|
||||||
} else {
|
|
||||||
mBinding?.xlhRk?.visibility = View.INVISIBLE
|
|
||||||
releaseCountDownTimer1()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (xlhBean.from_type == 103) {
|
|
||||||
val existingFragment =
|
|
||||||
supportFragmentManager.findFragmentByTag("TourClubDialogFragment") as TourClubDialogFragment?
|
|
||||||
if (existingFragment != null && existingFragment.isVisible) {
|
|
||||||
existingFragment.onMessageReceived(messageEvent)
|
|
||||||
} else {
|
|
||||||
LogUtils.e("TourClubDialogFragment", "巡乐会界面未打开")
|
|
||||||
// EventBus.getDefault().post(messageEvent)
|
|
||||||
}
|
|
||||||
xlhDjs(xlhBean.end_time)
|
|
||||||
} else if (xlhBean.from_type == 104) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var endTime: Long = 0
|
private var endTime: Long = 0
|
||||||
|
|
||||||
private fun xlhDjs(endTimeStr: String?) {
|
private fun xlhDjs(endTimeStr: String?) {
|
||||||
@@ -2351,15 +2368,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun onMessageEvent(messageEvent: UnreadCountEvent) {
|
|
||||||
if (messageEvent.aLong == 0L) {
|
|
||||||
mBinding!!.ivMessageDot.visibility = View.GONE
|
|
||||||
} else {
|
|
||||||
mBinding!!.ivMessageDot.visibility = View.VISIBLE
|
|
||||||
mBinding!!.ivMessageDot.text = messageEvent.aLong.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun querenPk(text: String, pk_id: String) {
|
private fun querenPk(text: String, pk_id: String) {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
@@ -2415,40 +2423,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mBinding!!.roomTop.btnFollow.text = ""
|
mBinding!!.roomTop.btnFollow.text = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 特效设置
|
|
||||||
*/
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun setEffectSwitch(event: EffectEvent) {
|
|
||||||
if (event.isEffectOn) { //特效开启
|
|
||||||
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(true)
|
|
||||||
mBinding!!.svgaGift.visibility = View.VISIBLE
|
|
||||||
} else {
|
|
||||||
// mBinding.svgaGift.closeEffect();
|
|
||||||
// mBinding.svgaGift.closeEffect();
|
|
||||||
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(false)
|
|
||||||
mBinding!!.svgaGift.visibility = View.GONE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 坐骑进场特效
|
|
||||||
*
|
|
||||||
* @param roomJoinMountModel
|
|
||||||
*/
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun roomJoinMount(roomJoinMountModel: RoomJoinMountModel) {
|
|
||||||
if (roomId != roomJoinMountModel.room_id) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (roomJoinMountModel.show_type != 1) {
|
|
||||||
val gift = GiftBean()
|
|
||||||
gift.gift_id = ""
|
|
||||||
gift.play_image = roomJoinMountModel.ride_url
|
|
||||||
QXGiftPlayerManager.getInstance(this).displayFullEffectView(roomJoinMountModel.ride_url)
|
|
||||||
// mBinding.svgaZuoji.setSource(roomJoinMountModel.getRide_url(), 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var isSwith = false
|
private var isSwith = false
|
||||||
private var voive = false //声音开关
|
private var voive = false //声音开关
|
||||||
@@ -2692,7 +2666,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
appStateListener!!.isAppInBackground = true
|
appStateListener!!.isAppInBackground = true
|
||||||
}
|
}
|
||||||
QXGiftPlayerManager.getInstance(applicationContext).destroyEffectSvga()
|
QXGiftPlayerManager.getInstance(applicationContext).destroyEffectSvga()
|
||||||
toActivity(MainActivity::class.java)
|
|
||||||
|
if (ActivityUtils.getActivityList().size <= 1){
|
||||||
|
singleTaskToActivity(MainActivity::class.java)
|
||||||
|
}else{
|
||||||
|
singleTaskToActivity(ActivityUtils.getActivityList()[1]::class.java)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun saveMinimizeState() {
|
private fun saveMinimizeState() {
|
||||||
@@ -2927,18 +2906,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun roomInfoEvent(messageEvent: RoomWheatEvent) {
|
|
||||||
if (messageEvent.roomId == roomId) {
|
|
||||||
if (messageEvent.isOccupied) {
|
|
||||||
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up)
|
|
||||||
aBoolean = false
|
|
||||||
} else {
|
|
||||||
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
|
||||||
aBoolean = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("MissingInflatedId")
|
@SuppressLint("MissingInflatedId")
|
||||||
fun dialogDismiss(type: Int) {
|
fun dialogDismiss(type: Int) {
|
||||||
@@ -3063,28 +3030,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
var inputSting: String? = null
|
var inputSting: String? = null
|
||||||
var intRed_num: String? = null
|
var intRed_num: String? = null
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun roomInfoEvent(messageEvent: UserInfo) {
|
|
||||||
if (messageEvent != null && messageEvent.red_num != null) {
|
|
||||||
inputSting = "# 口令红包 " + messageEvent.red_num
|
|
||||||
intRed_num = "# 口令红包 " + messageEvent.red_num
|
|
||||||
dialogDismiss(2)
|
|
||||||
} else if (messageEvent != null && messageEvent.ta != null) {
|
|
||||||
intRed_num = ""
|
|
||||||
inputSting = "@" + messageEvent.nickname
|
|
||||||
dialogDismiss(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getLayoutId(): Int {
|
override fun getLayoutId(): Int {
|
||||||
return R.layout.activity_room
|
return R.layout.activity_room
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun roomOut(roomOutEvent: RoomOutEvent?) {
|
|
||||||
performExitRoom(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun bindPresenter(): RoomPresenter {
|
override fun bindPresenter(): RoomPresenter {
|
||||||
return RoomPresenter(this, this)
|
return RoomPresenter(this, this)
|
||||||
@@ -3415,11 +3367,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
fun onHeadlineEvent(event: HeadlineBean?) {
|
|
||||||
mRoomInfoResp!!.room_info.head_line = event
|
|
||||||
toutiao()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qx
|
* @author qx
|
||||||
@@ -3515,9 +3462,91 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}else if (event is RoomGiftGiveEvent) {
|
||||||
|
if (event.roonGiftModel == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
giftGiveEvent = event
|
||||||
|
showGiftGiveProgress()
|
||||||
|
}else if(event is UnreadCountEvent){
|
||||||
|
if (event.aLong == 0L) {
|
||||||
|
mBinding!!.ivMessageDot.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
mBinding!!.ivMessageDot.visibility = View.VISIBLE
|
||||||
|
mBinding!!.ivMessageDot.text = event.aLong.toString()
|
||||||
|
}
|
||||||
|
}else if (event is EffectEvent){
|
||||||
|
if (event.isEffectOn) { //特效开启
|
||||||
|
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(true)
|
||||||
|
mBinding!!.svgaGift.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(false)
|
||||||
|
mBinding!!.svgaGift.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}else if (event is RoomJoinMountModel) {
|
||||||
|
//坐骑进场特效
|
||||||
|
if (roomId != event.room_id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (event.show_type != 1) {
|
||||||
|
val gift = GiftBean()
|
||||||
|
gift.gift_id = ""
|
||||||
|
gift.play_image = event.ride_url
|
||||||
|
QXGiftPlayerManager.getInstance(this).displayFullEffectView(event.ride_url)
|
||||||
|
}
|
||||||
|
}else if (event is RoomWheatEvent){
|
||||||
|
if (event.roomId == roomId) {
|
||||||
|
if (event.isOccupied) {
|
||||||
|
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up)
|
||||||
|
aBoolean = false
|
||||||
|
} else {
|
||||||
|
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
||||||
|
aBoolean = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if (event is UserInfo){
|
||||||
|
if (event.red_num != null) {
|
||||||
|
inputSting = "# 口令红包 " + event.red_num
|
||||||
|
intRed_num = "# 口令红包 " + event.red_num
|
||||||
|
dialogDismiss(2)
|
||||||
|
} else if (event.ta != null) {
|
||||||
|
intRed_num = ""
|
||||||
|
inputSting = "@" + event.nickname
|
||||||
|
dialogDismiss(1)
|
||||||
|
}
|
||||||
|
}else if (event is RoomOutEvent){
|
||||||
|
performExitRoom(2)
|
||||||
|
}else if (event is HeadlineBean){
|
||||||
|
mRoomInfoResp!!.room_info.head_line = event
|
||||||
|
toutiao()
|
||||||
|
}else if (event is MqttXlhEnd) {
|
||||||
|
val xlhBean: XLHBean =
|
||||||
|
GsonUtils.fromJson<XLHBean>(event.message, XLHBean::class.java)
|
||||||
|
if (xlhBean.from_type == 100) {
|
||||||
|
if (xlhBean.xlh_data != null) {
|
||||||
|
if (xlhBean.xlh_data.status == 1) {
|
||||||
|
mBinding?.xlhRk?.visibility = View.VISIBLE
|
||||||
|
xlhDjs(xlhBean.xlh_data.end_time)
|
||||||
|
} else {
|
||||||
|
mBinding?.xlhRk?.visibility = View.INVISIBLE
|
||||||
|
releaseCountDownTimer1()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (xlhBean.from_type == 103) {
|
||||||
|
val existingFragment =
|
||||||
|
supportFragmentManager.findFragmentByTag("TourClubDialogFragment") as TourClubDialogFragment?
|
||||||
|
if (existingFragment != null && existingFragment.isVisible) {
|
||||||
|
existingFragment.onMessageReceived(event)
|
||||||
|
} else {
|
||||||
|
LogUtils.e("TourClubDialogFragment", "巡乐会界面未打开")
|
||||||
|
}
|
||||||
|
xlhDjs(xlhBean.end_time)
|
||||||
|
} else if (xlhBean.from_type == 104) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
private var giftGiveEvent: RoomGiftGiveEvent? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 背景音乐
|
* 背景音乐
|
||||||
@@ -3747,6 +3776,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun applyPit() {
|
override fun applyPit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun downPit() {
|
override fun downPit() {
|
||||||
|
|||||||
@@ -1723,11 +1723,6 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
* 销毁视图和资源
|
* 销毁视图和资源
|
||||||
*/
|
*/
|
||||||
public void releaseResources() {
|
public void releaseResources() {
|
||||||
// 停止并释放所有SVGA动画资源
|
|
||||||
// stopAndReleaseSVGA(mBinding.iv22);
|
|
||||||
// stopAndReleaseSVGA(mBinding.iv11);
|
|
||||||
// stopAndReleaseSVGA(mBinding.iv33);
|
|
||||||
|
|
||||||
// 重置动画状态标志
|
// 重置动画状态标志
|
||||||
topIsAnimate = false;
|
topIsAnimate = false;
|
||||||
centerIsAnimate = false;
|
centerIsAnimate = false;
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ import com.xscm.modulemain.dialog.RoomCharmDialog;
|
|||||||
import com.xscm.modulemain.dialog.RoomOnlineDialogFragment;
|
import com.xscm.modulemain.dialog.RoomOnlineDialogFragment;
|
||||||
import com.xscm.modulemain.dialog.RoomUserInfoFragment;
|
import com.xscm.modulemain.dialog.RoomUserInfoFragment;
|
||||||
import com.google.android.flexbox.FlexboxLayout;
|
import com.google.android.flexbox.FlexboxLayout;
|
||||||
import com.hjq.toast.ToastUtils;
|
|
||||||
import com.luck.picture.lib.utils.DoubleUtils;
|
import com.luck.picture.lib.utils.DoubleUtils;
|
||||||
import com.xscm.modulemain.activity.room.contacts.SingSongContacts;
|
import com.xscm.modulemain.activity.room.contacts.SingSongContacts;
|
||||||
import com.xscm.modulemain.activity.room.presenter.SingSongPresenter;
|
import com.xscm.modulemain.activity.room.presenter.SingSongPresenter;
|
||||||
|
import com.xscm.moduleutil.BaseEvent;
|
||||||
import com.xscm.moduleutil.base.BaseRoomFragment;
|
import com.xscm.moduleutil.base.BaseRoomFragment;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
||||||
@@ -97,12 +97,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
protected RoomInfoResp roomInfoRespPk;
|
protected RoomInfoResp roomInfoRespPk;
|
||||||
protected String pitNumber;//当前点击的麦序
|
protected String pitNumber;//当前点击的麦序
|
||||||
protected CommonDialog commonDialog;
|
protected CommonDialog commonDialog;
|
||||||
// private WheatLayoutManager wheatLayoutManager;
|
|
||||||
private WheatLayoutSingManager wheatLayoutSingManager;
|
private WheatLayoutSingManager wheatLayoutSingManager;
|
||||||
private WheatLayoutManager wheatLayoutManager1;
|
private WheatLayoutManager wheatLayoutManager1;
|
||||||
private WheatLayoutManager wheatLayoutManager2;
|
private WheatLayoutManager wheatLayoutManager2;
|
||||||
|
|
||||||
|
|
||||||
private RoomPitBean roomPitBean;
|
private RoomPitBean roomPitBean;
|
||||||
|
|
||||||
private PopupWindow popupWindow;
|
private PopupWindow popupWindow;
|
||||||
@@ -110,7 +108,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
CountDownTimer mCountDownTimersta;
|
CountDownTimer mCountDownTimersta;
|
||||||
private RoomFragment parentFragment;
|
private RoomFragment parentFragment;
|
||||||
List<RoomPitBean> pitList;
|
List<RoomPitBean> pitList;
|
||||||
private SharedViewModel sharedViewModel;
|
|
||||||
|
|
||||||
public static SingSongFragment newInstance(RoomInfoResp roomInfoResp) {
|
public static SingSongFragment newInstance(RoomInfoResp roomInfoResp) {
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
@@ -127,13 +124,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
this.roomInfoResp = roomInfoResp;
|
this.roomInfoResp = roomInfoResp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initArgs(Bundle arguments) {
|
|
||||||
super.initArgs(arguments);
|
|
||||||
// roomInfoResp = (RoomInfoResp) arguments.getSerializable("roomInfo");
|
|
||||||
// roomId = roomInfoResp == null ? "" : roomInfoResp.getRoom_info().getRoom_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SingSongPresenter bindPresenter() {
|
protected SingSongPresenter bindPresenter() {
|
||||||
@@ -142,16 +132,17 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
|
upDtaView(false);
|
||||||
// Observable.timer(20, TimeUnit.MILLISECONDS)
|
// Observable.timer(20, TimeUnit.MILLISECONDS)
|
||||||
// .observeOn(AndroidSchedulers.mainThread())
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
// .subscribe(aLong -> {
|
// .subscribe(aLong -> {
|
||||||
// upDtaView(true);
|
// upDtaView(true);
|
||||||
// });
|
// });
|
||||||
Observable.timer(10, TimeUnit.MILLISECONDS)
|
// Observable.timer(100, TimeUnit.MILLISECONDS)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(aLong -> {
|
// .subscribe(aLong -> {
|
||||||
upDtaView(false);
|
// upDtaView(false);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void upRoomInfo(RoomInfoResp roomInfoResp) {
|
public void upRoomInfo(RoomInfoResp roomInfoResp) {
|
||||||
@@ -164,8 +155,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
((RoomActivity) getActivity()).setvisibTop(true);
|
((RoomActivity) getActivity()).setvisibTop(true);
|
||||||
}
|
}
|
||||||
// 初始化 PopupWindow
|
// 初始化 PopupWindow
|
||||||
|
createView(isFirst);
|
||||||
isWhether2(isFirst);
|
|
||||||
parentFragment = (RoomFragment) getParentFragment();
|
parentFragment = (RoomFragment) getParentFragment();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -173,17 +163,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
// sharedViewModel = new ViewModelProvider(requireActivity()).get(SharedViewModel.class);
|
|
||||||
//
|
|
||||||
// // 观察专门给子Fragment的数据
|
|
||||||
// sharedViewModel.getChildFragmentData().observe(getViewLifecycleOwner(), data -> {
|
|
||||||
// if (data != null) {
|
|
||||||
// // 处理数据
|
|
||||||
// roomInfoUpdate(data);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
roomId = roomInfoResp.getRoom_info().getRoom_id(); initPopupWindow();
|
roomId = roomInfoResp.getRoom_info().getRoom_id(); initPopupWindow();
|
||||||
|
|
||||||
return super.onCreateView(inflater, container, savedInstanceState);
|
return super.onCreateView(inflater, container, savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,19 +239,19 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
setPopupMenuClickListener(popupView, null);
|
setPopupMenuClickListener(popupView, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("UseSwitchCompatOrMaterialCode")
|
||||||
private void setPopupMenuClickListener(View popupView, View view) {
|
private void setPopupMenuClickListener(View popupView, View view) {
|
||||||
|
|
||||||
TextView tvHugMic = popupView.findViewById(R.id.tv_hug_mic);
|
TextView tvHugMic = popupView.findViewById(R.id.tv_hug_mic);
|
||||||
Switch switchCloseMic = popupView.findViewById(R.id.sw_close_mic);
|
Switch switchCloseMic = popupView.findViewById(R.id.sw_close_mic);
|
||||||
Switch switchLockMic = popupView.findViewById(R.id.sw_lock_mic);
|
Switch switchLockMic = popupView.findViewById(R.id.sw_lock_mic);
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
switchCloseMic.setChecked(roomPitBean.getIs_mute() == 1 ? true : false);//是否禁麦
|
switchCloseMic.setChecked(roomPitBean.getIs_mute() == 1);//是否禁麦
|
||||||
switchLockMic.setChecked(roomPitBean.getIs_lock() == 1 ? true : false);//是否闭麦
|
switchLockMic.setChecked(roomPitBean.getIs_lock() == 1);//是否闭麦
|
||||||
}
|
}
|
||||||
switchCloseMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchCloseMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||||
// AgoraManager.getInstance(getContext()).enableHeadphoneMonitor(b);
|
|
||||||
MvpPre.setMutePit(roomId, pitNumber + "", b ? "2" : "4");
|
MvpPre.setMutePit(roomId, pitNumber + "", b ? "2" : "4");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -280,9 +260,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
switchLockMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchLockMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||||
// AgoraManager.getInstance(getContext()).enableHeadphoneMonitor(b);
|
|
||||||
//耳返设置完保存本地
|
|
||||||
// SpUtil.setAuricularBack(b ? 1 : 0);
|
|
||||||
MvpPre.setLockPit(roomId, pitNumber + "", b ? "1" : "0");
|
MvpPre.setLockPit(roomId, pitNumber + "", b ? "1" : "0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -319,7 +296,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (roomInfoResp.getRoom_info().getPit_list().size() > 8) {
|
if (roomInfoResp.getRoom_info().getPit_list().size() > 8) {
|
||||||
// if (roomInfoResp.getRoom_info().getPit_list().get(8).getUser_id().equals(SpUtil.getUserId() + "") && !pitNumber.equals("10")) {
|
|
||||||
if (roomInfoResp.getUser_info().getPit_number() == 9 && !pitNumber.equals("10")) {
|
if (roomInfoResp.getUser_info().getPit_number() == 9 && !pitNumber.equals("10")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -397,7 +373,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
return false; // 不是快速重复点击
|
return false; // 不是快速重复点击
|
||||||
}
|
}
|
||||||
|
|
||||||
private void isWhether2(boolean isFirst) {
|
private void createView(boolean isFirst) {
|
||||||
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
|
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
|
||||||
mBinding.cl.setVisibility(View.GONE);
|
mBinding.cl.setVisibility(View.GONE);
|
||||||
|
|
||||||
@@ -482,92 +458,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
tzblChanged();
|
tzblChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void isWhether() {
|
|
||||||
if (roomInfoResp == null) {
|
|
||||||
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
|
|
||||||
mBinding.cl.setVisibility(View.GONE);
|
|
||||||
FlexboxLayout flexboxLayout = mBinding.flexboxLayout;
|
|
||||||
wheatLayoutSingManager = new WheatLayoutSingManager(requireContext(), flexboxLayout);
|
|
||||||
wheatLayoutSingManager.setOnWheatClickListener(new WheatLayoutSingManager.OnWheatClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onWheatClick(RoomSingSongWheatView view, int pitNumber1) {
|
|
||||||
// RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber1 - 1);
|
|
||||||
RoomPitBean pitBean = view.pitBean;
|
|
||||||
|
|
||||||
// 可选:点击事件处理
|
|
||||||
Log.d("Wheat", "Clicked pit: " + pitNumber1);
|
|
||||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
|
||||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number() + "", getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
|
||||||
// 点击的麦位是当前麦位
|
|
||||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
|
||||||
} else {
|
|
||||||
// 点击的麦位不是当前麦位
|
|
||||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
|
||||||
if (cheackWether(pitBean.getPit_number())) {
|
|
||||||
|
|
||||||
pitNumber = pitBean.getPit_number();
|
|
||||||
roomPitBean = pitBean;
|
|
||||||
showPopupMenu(view); // v 是点击的按钮视图
|
|
||||||
} else if (pitNumber1 == 10 && isUserHostOfRoom()) {
|
|
||||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
|
||||||
} else if (pitNumber1 != 10) {
|
|
||||||
MvpPre.applyPit(roomId, pitNumber1 + "");
|
|
||||||
} else {
|
|
||||||
ToastUtils.show("请等待主持抱麦");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
|
||||||
ToastUtils.show("点击麦位");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMeilingClick(RoomSingSongWheatView view, int pitNumber) {
|
|
||||||
// ToastUtils.show("点击魅力值");
|
|
||||||
RoomCharmDialog.newInstance(roomId, view.pitBean.getUser_id()).show(getChildFragmentManager(), "RoomCharmDialog");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
List<RoomPitBean> pitList = new ArrayList<>();
|
|
||||||
for (int i = 1; i <= 10; i++) {
|
|
||||||
RoomPitBean pitBean = new RoomPitBean();
|
|
||||||
pitBean.setPit_number("" + i);
|
|
||||||
pitBean.setUser_id("0");
|
|
||||||
pitBean.setCharm("");
|
|
||||||
pitList.add(pitBean);
|
|
||||||
}
|
|
||||||
wheatLayoutSingManager.setWheatData(pitList, false);
|
|
||||||
} else {
|
|
||||||
// if (roomInfoResp.getPk_info() == null) {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
|
|
||||||
// wheatLayoutSingManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
|
||||||
// }
|
|
||||||
//// initWheatLayout();
|
|
||||||
// } else {
|
|
||||||
// mBinding.flexboxLayout.setVisibility(View.GONE);
|
|
||||||
// mBinding.cl.setVisibility(View.VISIBLE);
|
|
||||||
// MvpPre.postRoomInfo(roomInfoResp.getPk_info().getPk_room_id(), roomInfoResp.getUser_info().getPit_number() + "", 1);
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (roomInfoResp.getUser_info().getPit_number() != 9) {
|
|
||||||
// mBinding.imMkf.setVisibility(GONE);
|
|
||||||
// } else {
|
|
||||||
// mBinding.imMkf.setVisibility(VISIBLE);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// tzblChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
mBinding.btSta.setOnClickListener(this::onClick);
|
|
||||||
mBinding.btStop.setOnClickListener(this::onClick);
|
|
||||||
mBinding.imMkf.setOnClickListener(this::onClick);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查当前用户是否是房间的主持人
|
* 检查当前用户是否是房间的主持人
|
||||||
*
|
*
|
||||||
@@ -647,44 +537,55 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/3/26 进入房间
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void subscribeMessages(RoomUserJoinModel event) {
|
public void onMainEvent(BaseEvent event){
|
||||||
Logger.e("@@@", "加入房间" + event);
|
if (event instanceof RoomWheatEvent){
|
||||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
//上麦模式变化通知 1自由2排麦
|
||||||
if (event.getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
if (roomId.equals(((RoomWheatEvent) event).getRoomId())) {
|
||||||
List<String> list = new ArrayList<>();
|
roomInfoResp.getRoom_info().setWheat(((RoomWheatEvent) event).isFree() ? "1" : "2");
|
||||||
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
}else if (event instanceof RoomUpPitBean){
|
||||||
}
|
if (((RoomUpPitBean) event).getPit_number() != null && !((RoomUpPitBean) event).getPit_number().equals("")) {
|
||||||
updateWheatData();
|
RoomPitBean roomPitBean1 = GsonUtils.GsonToBean(GsonUtils.GsonString(event), RoomPitBean.class);
|
||||||
}
|
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(((RoomUpPitBean) event).getTo_pit_number()) - 1);
|
||||||
|
roomPitBean1.setPit_number(((RoomUpPitBean) event).getTo_pit_number());
|
||||||
// TODO: 2025/3/26 离开房间
|
roomPitBean.setPit_number(((RoomUpPitBean) event).getPit_number());
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(((RoomUpPitBean) event).getPit_number()) - 1, roomPitBean);
|
||||||
public void subscribeMessages(RoomOwnerLeaveEvent event) {
|
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(((RoomUpPitBean) event).getTo_pit_number()) - 1, roomPitBean1);
|
||||||
Logger.e("@@@", "离开房间" + event);
|
}
|
||||||
if (roomInfoResp.getRoom_info().getFriend().getFriend_status() == 2) {
|
updateWheatData();
|
||||||
|
}else if (event instanceof RoomUserJoinModel){
|
||||||
|
Logger.e("@@@", "加入房间" + event);
|
||||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||||
if (event.getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
if (((RoomUserJoinModel) event).getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
updateWheatData();
|
||||||
|
}else if (event instanceof RoomOwnerLeaveEvent){
|
||||||
|
Logger.e("@@@", "离开房间" + event);
|
||||||
|
if (roomInfoResp.getRoom_info().getFriend().getFriend_status() == 2) {
|
||||||
|
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||||
|
if (((RoomOwnerLeaveEvent) event).getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateWheatData();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWheatData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void roomInfoUpdate(RoomInfoResp resp) {
|
public void roomInfoUpdate(RoomInfoResp resp) {
|
||||||
roomInfoResp = resp;
|
roomInfoResp = resp;
|
||||||
roomId = roomInfoResp == null ? "" : roomInfoResp.getRoom_info().getRoom_id();
|
roomId = roomInfoResp == null ? "" : roomInfoResp.getRoom_info().getRoom_id();
|
||||||
// isWhether();
|
|
||||||
upWheter();
|
upWheter();
|
||||||
updateWheatData();
|
updateWheatData();
|
||||||
}
|
}
|
||||||
@@ -702,30 +603,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
super.initListener();
|
super.initListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 上麦模式变化通知 1自由2排麦
|
|
||||||
*/
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void subscribeMessages(RoomWheatEvent roomWheatEvent) {
|
|
||||||
if (roomId.equals(roomWheatEvent.getRoomId())) {
|
|
||||||
roomInfoResp.getRoom_info().setWheat(roomWheatEvent.isFree() ? "1" : "2");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onSwitchPitEvent(RoomUpPitBean event) {
|
|
||||||
if (event.getPit_number() != null && !event.getPit_number().equals("")) {
|
|
||||||
RoomPitBean roomPitBean1 = GsonUtils.GsonToBean(GsonUtils.GsonString(event), RoomPitBean.class);
|
|
||||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(event.getTo_pit_number()) - 1);
|
|
||||||
roomPitBean1.setPit_number(event.getTo_pit_number());
|
|
||||||
roomPitBean.setPit_number(event.getPit_number());
|
|
||||||
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(event.getPit_number()) - 1, roomPitBean);
|
|
||||||
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(event.getTo_pit_number()) - 1, roomPitBean1);
|
|
||||||
}
|
|
||||||
updateWheatData();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean aBoolean = false;
|
private boolean aBoolean = false;
|
||||||
private int is_mute;
|
private int is_mute;
|
||||||
@@ -798,7 +676,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
@Override
|
@Override
|
||||||
public void postRoomInfo(RoomInfoResp resp) {
|
public void postRoomInfo(RoomInfoResp resp) {
|
||||||
roomInfoResp = resp;
|
roomInfoResp = resp;
|
||||||
isWhether2(false);
|
createView(false);
|
||||||
tzblChanged();
|
tzblChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1134,184 +1012,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
// public void onMessageReceived(RoomMessageEvent message) {
|
|
||||||
// boolean b = false;
|
|
||||||
//
|
|
||||||
// if (message.getMsgType() == 1003) {
|
|
||||||
// RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(message.getText().getPit_number()) - 1);
|
|
||||||
// pitBean.setUser_id(message.getText().getFromUserInfo().getUser_id() + "");
|
|
||||||
// pitBean.setAvatar(message.getText().getFromUserInfo().getAvatar());
|
|
||||||
// pitBean.setNickname(message.getText().getFromUserInfo().getNickname());
|
|
||||||
// pitBean.setSex(message.getText().getFromUserInfo().getSex() + "");
|
|
||||||
// pitBean.setCharm(message.getText().getFromUserInfo().getCharm());
|
|
||||||
// pitBean.setDress(message.getText().getFromUserInfo().getDress());
|
|
||||||
// roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
|
||||||
//// if (roomInfoResp.getPk_info()==null) {
|
|
||||||
// if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
|
||||||
// wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
|
||||||
// } else {
|
|
||||||
// wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
|
||||||
// }
|
|
||||||
//// }else {
|
|
||||||
//// wheatLayoutManager.setWheatDataPk(roomInfoResp.getRoom_info().getPit_list(), 1);
|
|
||||||
//// }
|
|
||||||
// // 通知父 Fragment
|
|
||||||
// if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
|
||||||
// b = true;
|
|
||||||
// AgoraManager.getInstance(getActivity()).ClientRole(true);
|
|
||||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
|
||||||
// } else {
|
|
||||||
// b = false;
|
|
||||||
// }
|
|
||||||
// if (parentFragment != null) {
|
|
||||||
// parentFragment.updateWheatStatus(pitBean, Integer.parseInt(message.getText().getPit_number()), true, b);
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1004) {
|
|
||||||
// RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(message.getText().getPit_number()) - 1);
|
|
||||||
// pitBean.setUser_id("");
|
|
||||||
// pitBean.setAvatar("");
|
|
||||||
// pitBean.setNickname("");
|
|
||||||
// pitBean.setSex("");
|
|
||||||
// pitBean.setCharm("");
|
|
||||||
// pitBean.setDress("");
|
|
||||||
// roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
|
||||||
// if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
|
||||||
// wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
|
||||||
// } else {
|
|
||||||
// wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
|
||||||
// }
|
|
||||||
// if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
|
||||||
// b = true;
|
|
||||||
// AgoraManager.getInstance(getActivity()).ClientRole(false);
|
|
||||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
|
||||||
// } else {
|
|
||||||
// b = false;
|
|
||||||
// }
|
|
||||||
//// AgoraManager.getInstance(getActivity()).setEnableAudio(b);
|
|
||||||
// if (parentFragment != null) {
|
|
||||||
// parentFragment.updateWheatStatus(pitBean, Integer.parseInt(message.getText().getPit_number()), false, b);
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1005) {
|
|
||||||
// if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoRespPk.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutManager2.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1030) {
|
|
||||||
// MvpPre.postRoomInfo(message.getRoomId(), roomInfoResp.getUser_info().getPit_number() + "", 3);
|
|
||||||
// if (message.getText().getType() == 1) {
|
|
||||||
// MvpPre.postRoomInfo(message.getText().getRoom_id(), roomInfoResp.getUser_info().getPit_number() + "", 1);
|
|
||||||
// if (message.getText().getRoom_id().equals(roomId)) {
|
|
||||||
// mBinding.btSta.setVisibility(VISIBLE);
|
|
||||||
// } else {
|
|
||||||
// mBinding.btSta.setVisibility(INVISIBLE);
|
|
||||||
// }
|
|
||||||
//// parentFragment.setRoleType(5, -11);
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
|
||||||
// ((RoomActivity) getActivity()).setRoleType(5, -11);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1031) {
|
|
||||||
// countDownTime(Long.parseLong(message.getText().getPk_end_times()), 1);
|
|
||||||
// mBinding.btSta.setVisibility(INVISIBLE);
|
|
||||||
// } else if (message.getMsgType() == 1032) {
|
|
||||||
//// PkResultDialogFragment pkResultDialogFragment = new PkResultDialogFragment(requireContext(), message);
|
|
||||||
//// pkResultDialogFragment.show();
|
|
||||||
// showCountDownDialog(requireContext(), message);
|
|
||||||
// ivitTop(message);
|
|
||||||
//// parentFragment.setRoleType(3, -11);
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
|
||||||
// ((RoomActivity) getActivity()).setRoleType(3, -11);
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1033) {
|
|
||||||
// AgoraManager.getInstance(getContext()).leaveChannelEx(roomInfoRespPk.getRoom_info().getRoom_id(), SpUtil.getUserId());
|
|
||||||
// MvpPre.postRoomInfo(roomId, "0", 2);
|
|
||||||
// mBinding.imStart2.setVisibility(GONE);
|
|
||||||
// mBinding.imStart.setVisibility(GONE);
|
|
||||||
//// parentFragment.setRoleType(3, -11);
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
|
||||||
// ((RoomActivity) getActivity()).setRoleType(3, -11);
|
|
||||||
// }
|
|
||||||
// roomInfoRespPk = null;
|
|
||||||
//
|
|
||||||
// } else if (message.getMsgType() == 1015) {
|
|
||||||
// String roomIdA = message.getText().getRoom_id_a();
|
|
||||||
// String roomIdB = message.getText().getRoom_id_b();
|
|
||||||
// String createValueA = message.getText().getCreate_value_a();
|
|
||||||
// String receiveValueB = message.getText().getReceive_value_b();
|
|
||||||
//
|
|
||||||
// if (roomIdA.equals(roomId)) {
|
|
||||||
// // 当前 roomId 与 roomIdA 相同
|
|
||||||
// mBinding.tvPkLeftValue.setText(createValueA);
|
|
||||||
// mBinding.tvPkRightValue.setText(receiveValueB);
|
|
||||||
// mBinding.pkProgress.setAnimProgress(100f * Integer.parseInt(createValueA) / (Integer.parseInt(createValueA) + Integer.parseInt(receiveValueB)));
|
|
||||||
//
|
|
||||||
// } else if (roomIdB.equals(roomId)) {
|
|
||||||
// // 当前 roomId 与 roomIdB 相同
|
|
||||||
// mBinding.tvPkLeftValue.setText(receiveValueB);
|
|
||||||
// mBinding.tvPkRightValue.setText(createValueA);
|
|
||||||
// mBinding.pkProgress.setAnimProgress(100f * Integer.parseInt(receiveValueB) / (Integer.parseInt(createValueA) + Integer.parseInt(receiveValueB)));
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 125) {
|
|
||||||
// RoomMessageEvent.text text = com.blankj.utilcode.util.GsonUtils.fromJson(message.getText().getText(), RoomMessageEvent.text.class);
|
|
||||||
// if (text.getIs_mute() == 1) {
|
|
||||||
// AgoraManager.getInstance(getContext()).ClientRole(false);
|
|
||||||
// AgoraManager.getInstance(getContext()).muteLocalAudioStreamEx(false, SpUtil.getUserId());
|
|
||||||
// } else {
|
|
||||||
// AgoraManager.getInstance(getContext()).ClientRole(true);
|
|
||||||
// AgoraManager.getInstance(getContext()).muteLocalAudioStreamEx(true, SpUtil.getUserId());
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1007) {
|
|
||||||
// roomInfoResp.getUser_info().setIs_host(1);
|
|
||||||
// } else if (message.getMsgType() == 1018) {
|
|
||||||
// roomInfoResp.getUser_info().setIs_host(0);
|
|
||||||
// } else if (message.getMsgType() == 126) {
|
|
||||||
// AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, message.getText().getFromUserInfo().getUser_id() + "");
|
|
||||||
// } else if (message.getMsgType() == 1021) {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// pitBean.setCharm("0");
|
|
||||||
// wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1037) {
|
|
||||||
|
|
||||||
/// / 对方想结束本次pk,是否同意
|
|
||||||
// if (message.getText().getPit_number().equals("9") && message.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
|
||||||
// queren();
|
|
||||||
// }
|
|
||||||
// } else if (message.getMsgType() == 1035) {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getFromUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getFromUserInfo().getCharm());
|
|
||||||
// pitBean.setAvatar(message.getText().getFromUserInfo().getAvatar());
|
|
||||||
// pitBean.setNickname(message.getText().getFromUserInfo().getNickname());
|
|
||||||
// pitBean.setSex(message.getText().getFromUserInfo().getSex() + "");
|
|
||||||
// pitBean.setDress(message.getText().getFromUserInfo().getDress());
|
|
||||||
// wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
public void event1021(RoomMessageEvent message) {
|
public void event1021(RoomMessageEvent message) {
|
||||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||||
pitBean.setCharm("0");
|
pitBean.setCharm("0");
|
||||||
@@ -1431,18 +1131,8 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
pitBean.setDress("");
|
pitBean.setDress("");
|
||||||
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(message.getText().getPit_number()) - 1, pitBean);
|
||||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
// if (pitBean.getPit_number().equals("9")){
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
|
||||||
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
} else {
|
} else {
|
||||||
// if (pitBean.getPit_number().equals("9")){
|
|
||||||
// if (getActivity() instanceof RoomActivity) {
|
|
||||||
// ((RoomActivity) getActivity()).ivSoundEffects(false);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||||
}
|
}
|
||||||
if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
if (SpUtil.getUserId() == message.getText().getFromUserInfo().getUser_id()) {
|
||||||
@@ -1472,28 +1162,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
updateCharmForUser(toUserInfo);
|
updateCharmForUser(toUserInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutSingManager.upDataCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// for (RoomPitBean pitBean : roomInfoRespPk.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutManager2.updateSingleCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
|
||||||
// if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
|
||||||
// pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
|
||||||
// wheatLayoutManager1.updateSingleCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1739,11 +1407,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// btnKnow.setOnClickListener(v -> {
|
|
||||||
// countDownTimer.cancel(); // 取消倒计时
|
|
||||||
// dialog.dismiss(); // 手动关闭对话框
|
|
||||||
// });
|
|
||||||
|
|
||||||
Window window = dialog.getWindow();
|
Window window = dialog.getWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
@@ -1756,13 +1419,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||||
lp.width = (int) (context.getResources().getDisplayMetrics().widthPixels * 0.9f); // 80% 屏幕宽度
|
lp.width = (int) (context.getResources().getDisplayMetrics().widthPixels * 0.9f); // 80% 屏幕宽度
|
||||||
int maxHeightDp = 200; // 最大高度 200dp
|
|
||||||
int maxHeightPx = (int) (maxHeightDp * context.getResources().getDisplayMetrics().density);
|
|
||||||
|
|
||||||
// lp.height = Math.min(
|
|
||||||
// maxHeightPx,
|
|
||||||
// context.getResources().getDisplayMetrics().heightPixels * 3 / 5
|
|
||||||
// ); // 取较小值
|
|
||||||
dialog.getWindow().setAttributes(lp);
|
dialog.getWindow().setAttributes(lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1794,18 +1450,9 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
mBinding.flexboxLayout.removeAllViews();
|
mBinding.flexboxLayout.removeAllViews();
|
||||||
mBinding.flexboxLayout2.removeAllViews();
|
mBinding.flexboxLayout2.removeAllViews();
|
||||||
if (sharedViewModel != null) {
|
|
||||||
sharedViewModel.clearChildFragmentData();
|
|
||||||
}
|
|
||||||
if (MvpPre != null) {
|
if (MvpPre != null) {
|
||||||
MvpPre.detachView();
|
MvpPre.detachView();
|
||||||
}
|
}
|
||||||
// 将磁盘缓存清理放在后台线程执行
|
|
||||||
// new Thread(() -> {
|
|
||||||
// if (getActivity() != null) {
|
|
||||||
// ImageUtils.clearDiskCache(getActivity());
|
|
||||||
// }
|
|
||||||
// }).start();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
|||||||
}else if (id == R.id.tv_my_wallet){//钱包
|
}else if (id == R.id.tv_my_wallet){//钱包
|
||||||
startActivity(new Intent(getContext(), MyMoneyActivity.class));
|
startActivity(new Intent(getContext(), MyMoneyActivity.class));
|
||||||
}else if (id == R.id.riv_user_head ){//用户主页
|
}else if (id == R.id.riv_user_head ){//用户主页
|
||||||
Intent intent = new Intent(getContext(), UserHomepageActivity.class);
|
Intent intent = new Intent(getContext(), UserHomepageActivity.class);
|
||||||
intent.putExtra("userId",SpUtil.getUserId()+"");
|
intent.putExtra("userId",SpUtil.getUserId()+"");
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,16 +254,7 @@ public class RoomManager {
|
|||||||
LogUtils.dTag("RoomActivity", "navigateToRoom:房间信息获取存在问题");
|
LogUtils.dTag("RoomActivity", "navigateToRoom:房间信息获取存在问题");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 使用ARouter跳转到房间页面
|
|
||||||
// ARouter.getInstance()
|
|
||||||
// .build(ARouteConstants.ROOM_DETAILS)
|
|
||||||
// .with(bundle)
|
|
||||||
// .navigation(context);
|
|
||||||
|
|
||||||
|
|
||||||
ActivityUtils.getTopActivity().startActivity(intent);
|
ActivityUtils.getTopActivity().startActivity(intent);
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.e(TAG, "跳转房间页面失败: " + e.getMessage());
|
Logger.e(TAG, "跳转房间页面失败: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user