房间内部优化。
This commit is contained in:
@@ -46,7 +46,7 @@ public class EMMessageInfo implements MultiItemEntity {
|
|||||||
public static final int QXRoomMessageTypeRoomIsClose = 1019;
|
public static final int QXRoomMessageTypeRoomIsClose = 1019;
|
||||||
/// 修改房间信息
|
/// 修改房间信息
|
||||||
public static final int QXRoomMessageTypeRoomUpdate = 1020;
|
public static final int QXRoomMessageTypeRoomUpdate = 1020;
|
||||||
/// 清楚魅力值
|
/// 清除魅力值
|
||||||
public static final int QXRoomMessageTypeRoom = 1021;
|
public static final int QXRoomMessageTypeRoom = 1021;
|
||||||
/// 拍卖者被拉上麦
|
/// 拍卖者被拉上麦
|
||||||
public static final int QXRoomMessageTypeAuctionIsUp = 1022;
|
public static final int QXRoomMessageTypeAuctionIsUp = 1022;
|
||||||
@@ -78,8 +78,16 @@ public class EMMessageInfo implements MultiItemEntity {
|
|||||||
public static final int QXRoomMessageTypeRoomOnline = 1036;//
|
public static final int QXRoomMessageTypeRoomOnline = 1036;//
|
||||||
public static final int QXRoomMessageTypeRoomOPK = 1037;
|
public static final int QXRoomMessageTypeRoomOPK = 1037;
|
||||||
public static final int QXRoomMessageTypeRoomOMh = 1038;
|
public static final int QXRoomMessageTypeRoomOMh = 1038;
|
||||||
|
|
||||||
|
///清除当前消息列表
|
||||||
|
public static final int QXRoomMessageTypeClearMsg = 123;
|
||||||
|
|
||||||
|
///播放音乐
|
||||||
|
public static final int QXRoomMessageTypeRoomMusicPlay = 124;
|
||||||
|
|
||||||
///关闭对方麦克风
|
///关闭对方麦克风
|
||||||
public static final int QXRoomMessageTypeMuteRemoteAudio = 125;
|
public static final int QXRoomMessageTypeMuteRemoteAudio = 125;
|
||||||
|
///小黑屋 关麦
|
||||||
public static final int QXRoomMessageTypeMuteLocalAudio = 126;
|
public static final int QXRoomMessageTypeMuteLocalAudio = 126;
|
||||||
|
|
||||||
/// 交友房阶段发生变化
|
/// 交友房阶段发生变化
|
||||||
@@ -104,12 +112,16 @@ public class EMMessageInfo implements MultiItemEntity {
|
|||||||
public static final int QXRoomMessageTypezailx = 1058;
|
public static final int QXRoomMessageTypezailx = 1058;
|
||||||
///清除个人魅力值
|
///清除个人魅力值
|
||||||
public static final int QXRoomMessageTypeQingGRMl = 1059;
|
public static final int QXRoomMessageTypeQingGRMl = 1059;
|
||||||
//有红包列表
|
///有红包列表
|
||||||
public static final int QXRoomMessageTypeQXRoomMessageRed = 1060;
|
public static final int QXRoomMessageTypeQXRoomMessageRed = 1060;
|
||||||
|
///移除红包
|
||||||
public static final int QXRoomMessageTypeQXRoomMessageRedRemove = 1061;
|
public static final int QXRoomMessageTypeQXRoomMessageRedRemove = 1061;
|
||||||
|
|
||||||
///房间内换麦
|
///房间内换麦
|
||||||
public static final int QXRoomMessageTypehm = 1039;
|
public static final int QXRoomMessageTypehm = 1039;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private RoomMessageEvent emMessage;
|
private RoomMessageEvent emMessage;
|
||||||
|
|
||||||
private int custom = 0;
|
private int custom = 0;
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class PkRoomInfo implements Serializable {
|
public class PkRoomInfo implements Serializable {
|
||||||
private String pk_room_id;//对方房间的roomId
|
private String pk_room_id;//对方房间的roomId
|
||||||
private String invite_pk_user_id;//pk发起者的用户id
|
private int invite_pk_user_id = -1;//pk发起者的用户id
|
||||||
private String pk_id;//pkid
|
private String pk_id;//pkid
|
||||||
private String pk_time;//剩余时间点
|
private String pk_time;//剩余时间点
|
||||||
private String my_room_value;//自己房间的pk值
|
private String my_room_value;//自己房间的pk值
|
||||||
private String pk_room_value;//对方房间的pk值
|
private String pk_room_value;//对方房间的pk值
|
||||||
private String pk_part;;//2:等待开始、3:进行中、4:惩罚阶段
|
private String pk_part;;//2:等待开始、3:进行中、4:惩罚阶段
|
||||||
private String pk_end_times;
|
private String pk_end_times;
|
||||||
private String receive_pk_user_id;//接受pk的用户id
|
private int receive_pk_user_id = -2;//接受pk的用户id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class RoomPitBean implements Serializable {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private String id;//id
|
private String id;//id
|
||||||
private String pit_number;//麦位号
|
private String pit_number = "-1";//麦位号
|
||||||
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
||||||
private int is_lock;//0未锁麦 1锁麦
|
private int is_lock;//0未锁麦 1锁麦
|
||||||
private int is_mute;//0未禁麦 1禁麦
|
private int is_mute;//0未禁麦 1禁麦
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class RoomUserBean implements Serializable {
|
|||||||
* shutup : 0
|
* shutup : 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String user_id;//用户id
|
private int user_id;//用户id
|
||||||
private String user_code;//用户id码
|
private String user_code;//用户id码
|
||||||
private String sex;//性别1男2女
|
private String sex;//性别1男2女
|
||||||
private String nickname;//用户昵称
|
private String nickname;//用户昵称
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public class AgoraManagerEx {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public void joinChannelEx(String token, String channelId, String pkUserIds) {
|
public void joinChannelEx(String token, String channelId, int pkUserIds) {
|
||||||
if (rtcEngineEx != null) {
|
if (rtcEngineEx != null) {
|
||||||
options = new ChannelMediaOptions();
|
options = new ChannelMediaOptions();
|
||||||
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
||||||
@@ -311,7 +311,7 @@ public class AgoraManagerEx {
|
|||||||
connection.channelId = channelId;
|
connection.channelId = channelId;
|
||||||
connection.localUid = SpUtil.getUserId();
|
connection.localUid = SpUtil.getUserId();
|
||||||
pkRoomId = channelId;
|
pkRoomId = channelId;
|
||||||
pkUserId = Integer.parseInt(pkUserIds);
|
pkUserId = pkUserIds;
|
||||||
rtcEngineEx.joinChannelEx(token, connection, options, getDefaultEventHandler());
|
rtcEngineEx.joinChannelEx(token, connection, options, getDefaultEventHandler());
|
||||||
muteAllRemoteAudioStreamsEx(true);
|
muteAllRemoteAudioStreamsEx(true);
|
||||||
muteAllRemoteAudioStreamsExUserId(false);
|
muteAllRemoteAudioStreamsExUserId(false);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
|
|
||||||
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
||||||
private static CrashHandler instance;
|
private static CrashHandler instance;
|
||||||
@@ -37,5 +38,6 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
|||||||
private void restartApp() {
|
private void restartApp() {
|
||||||
// 实现应用重启逻辑
|
// 实现应用重启逻辑
|
||||||
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
||||||
|
CommonAppContext.getInstance().initialization();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
|||||||
this.pitBean = bean;
|
this.pitBean = bean;
|
||||||
this.roomId = bean.getRoom_id();
|
this.roomId = bean.getRoom_id();
|
||||||
countDownTime(bean.getCount_down());
|
countDownTime(bean.getCount_down());
|
||||||
|
|
||||||
setCardiac(pitBean.getCharm(), getTzbl());
|
setCardiac(pitBean.getCharm(), getTzbl());
|
||||||
|
|
||||||
if (bean.getUser_id() != null && !bean.getUser_id().equals("0") && !bean.getUser_id().isEmpty()) {
|
if (bean.getUser_id() != null && !bean.getUser_id().equals("0") && !bean.getUser_id().isEmpty()) {
|
||||||
|
|||||||
@@ -145,8 +145,6 @@ public class GiftAnimView extends FrameLayout implements GiftSvgaView.OnAnimatio
|
|||||||
if (stringList == null || stringList.isEmpty()) {
|
if (stringList == null || stringList.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// 锁住list
|
/// 锁住list
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleOnState(RoomPitBean bean) {
|
private void handleOnState(RoomPitBean bean) {
|
||||||
mIvRipple.setVisibility(VISIBLE);
|
// mIvRipple.setVisibility(VISIBLE);
|
||||||
mTvName.setText(bean.getNickname());
|
mTvName.setText(bean.getNickname());
|
||||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||||
mCharmView.setVisibility(VISIBLE);
|
mCharmView.setVisibility(VISIBLE);
|
||||||
|
|||||||
@@ -108,6 +108,12 @@
|
|||||||
<attr name="matProg_linearProgress" format="boolean" />
|
<attr name="matProg_linearProgress" format="boolean" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
<style name="dialogBottom" parent="@style/AppTheme">
|
||||||
|
<item name="android:windowEnterAnimation">@anim/dialog_enter</item>
|
||||||
|
<item name="android:windowExitAnimation">@anim/dialog_exit</item>
|
||||||
|
<item name="android:windowBackground">@android:color/transparent</item> <!-- 透明背景 -->
|
||||||
|
<item name="android:windowIsFloating">true</item> <!-- 确保是对话框样式 -->
|
||||||
|
</style>
|
||||||
<style name="CommonShowDialogBottom" parent="android:Animation">
|
<style name="CommonShowDialogBottom" parent="android:Animation">
|
||||||
<!--//进入时的动画-->
|
<!--//进入时的动画-->
|
||||||
<item name="android:windowEnterAnimation">@anim/dialog_enter</item>
|
<item name="android:windowEnterAnimation">@anim/dialog_enter</item>
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ import com.xscm.moduleutil.bean.RoomSingleton
|
|||||||
import com.xscm.moduleutil.bean.UserInfo
|
import com.xscm.moduleutil.bean.UserInfo
|
||||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean
|
||||||
import com.xscm.moduleutil.bean.XLHBean
|
import com.xscm.moduleutil.bean.XLHBean
|
||||||
|
import com.xscm.moduleutil.bean.room.EMMessageInfo
|
||||||
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.FriendUserBean
|
||||||
import com.xscm.moduleutil.bean.room.RoomAuction
|
import com.xscm.moduleutil.bean.room.RoomAuction
|
||||||
@@ -178,6 +179,7 @@ import java.nio.charset.StandardCharsets
|
|||||||
import java.util.Arrays
|
import java.util.Arrays
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.stream.Collectors
|
import java.util.stream.Collectors
|
||||||
|
import kotlin.math.E
|
||||||
|
|
||||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||||
class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||||
@@ -191,7 +193,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
//房间用户信息
|
//房间用户信息
|
||||||
private var mRoomUserBean: RoomUserBean? = null
|
private var mRoomUserBean: RoomUserBean? = null
|
||||||
private var mPitList: List<RoomPitBean> = ArrayList()
|
|
||||||
var password: String? = null
|
var password: String? = null
|
||||||
var roomId: String? = null
|
var roomId: String? = null
|
||||||
var mRoomInfoResp: RoomInfoResp? = null
|
var mRoomInfoResp: RoomInfoResp? = null
|
||||||
@@ -274,7 +275,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// 在super.onCreate之前设置主题以避免闪白屏
|
// 在super.onCreate之前设置主题以避免闪白屏
|
||||||
// setTheme(com.xscm.moduleutil.R.style.BaseAppTheme) // 设置你的主主题
|
// setTheme(com.xscm.moduleutil.R.style.BaseAppTheme) // 设置你的主主题
|
||||||
@@ -876,7 +876,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
this.mRoomBean = roomBean
|
this.mRoomBean = roomBean
|
||||||
this.mRoomUserBean = resp.user_info
|
this.mRoomUserBean = resp.user_info
|
||||||
this.mRoomOwnerBean = resp.room_owner
|
this.mRoomOwnerBean = resp.room_owner
|
||||||
this.mPitList = mRoomBean?.pit_list ?: ArrayList()
|
|
||||||
this.roomId = roomBean.room_id
|
this.roomId = roomBean.room_id
|
||||||
|
|
||||||
ImageUtils.loadHeadCC(resp.room_info.room_cover, mBinding!!.roomTop.avatar)
|
ImageUtils.loadHeadCC(resp.room_info.room_cover, mBinding!!.roomTop.avatar)
|
||||||
@@ -938,9 +937,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||||
.toString() + ""
|
|
||||||
) {
|
|
||||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||||
ivSoundEffects(true)
|
ivSoundEffects(true)
|
||||||
} else {
|
} else {
|
||||||
@@ -1261,7 +1258,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
val msgType = messageEvent.msgType
|
val msgType = messageEvent.msgType
|
||||||
val text = messageEvent.text
|
val text = messageEvent.text
|
||||||
|
|
||||||
if (msgType == 1005) {
|
if (msgType == EMMessageInfo.QXRoomMessageTypeGift) {
|
||||||
LogUtils.e("@@@@" + "EventBusnujm2" + "playQueue.size()====" + messageEvent.text.giftInfo)
|
LogUtils.e("@@@@" + "EventBusnujm2" + "playQueue.size()====" + messageEvent.text.giftInfo)
|
||||||
val playQueue = Arrays.asList(
|
val playQueue = Arrays.asList(
|
||||||
*messageEvent.text.giftInfo.play_image.split(",".toRegex())
|
*messageEvent.text.giftInfo.play_image.split(",".toRegex())
|
||||||
@@ -1269,8 +1266,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
)
|
)
|
||||||
QXGiftPlayerManager.getInstance(this).displayFullEffectView1(playQueue)
|
QXGiftPlayerManager.getInstance(this).displayFullEffectView1(playQueue)
|
||||||
|
|
||||||
if (messageEvent!!.text.giftInfo != null) {
|
if (messageEvent.text.giftInfo != null) {
|
||||||
var giftBean = messageEvent.text.giftInfo
|
val giftBean = messageEvent.text.giftInfo
|
||||||
giftBean.nickname = messageEvent.text.fromUserInfo.nickname
|
giftBean.nickname = messageEvent.text.fromUserInfo.nickname
|
||||||
giftBean.userAvatar = messageEvent.text.fromUserInfo.avatar
|
giftBean.userAvatar = messageEvent.text.fromUserInfo.avatar
|
||||||
LogUtils.e("1005", messageEvent.text.toUserInfo?.nickname)
|
LogUtils.e("1005", messageEvent.text.toUserInfo?.nickname)
|
||||||
@@ -1280,94 +1277,99 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
GiftDisplayManager.getInstance().receiveGift(giftBean)
|
GiftDisplayManager.getInstance().receiveGift(giftBean)
|
||||||
}
|
}
|
||||||
hand1005(messageEvent, text)
|
hand1005(messageEvent, text)
|
||||||
} else if (msgType == 123) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeClearMsg) {//清除当前消息
|
||||||
EventBus.getDefault().post(RoomSettingEvent())
|
EventBus.getDefault().post(RoomSettingEvent())
|
||||||
} else if (msgType == 1014) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAplayPitModeDidChanged) {
|
||||||
handleMsgType1014(messageEvent, text)
|
handleMsgType1014(messageEvent, text)
|
||||||
} else if (msgType == 1013) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSwicthSong) {
|
||||||
handleMsgType1013(messageEvent, text)
|
handleMsgType1013(messageEvent, text)
|
||||||
} else if (msgType == 1012) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomTypeChanged) {
|
||||||
handleMsgType1012()
|
handleMsgType1012()
|
||||||
} else if (msgType == 124) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomMusicPlay) {//播放音乐
|
||||||
handleMsgType124(messageEvent, text)
|
handleMsgType124(messageEvent, text)
|
||||||
} else if (msgType == 1003) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeUpSeat) {
|
||||||
handleMsgType1003(messageEvent, text)
|
handleMsgType1003(messageEvent, text)
|
||||||
} else if (msgType == 1004) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeDownSeat) {
|
||||||
handleMsgType1004(messageEvent, text)
|
handleMsgType1004(messageEvent, text)
|
||||||
} else if (msgType == 1022) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAuctionIsUp) {
|
||||||
handleMsgType1022(messageEvent, text)
|
handleMsgType1022(messageEvent, text)
|
||||||
} else if (msgType == 1023) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAuctionIsSelected) {
|
||||||
handleMsgType1023(messageEvent, text)
|
handleMsgType1023(messageEvent, text)
|
||||||
} else if (msgType == 1024) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAuctionIsStart) {
|
||||||
handleMsgType1024(messageEvent, text)
|
handleMsgType1024(messageEvent, text)
|
||||||
} else if (msgType == 1025) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAuctionIsEnd) {
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
} else if (msgType == 1026) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCompereDelay) {
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
} else if (msgType == 1027) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeAuctionTypeChanged) {
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
} else if (msgType == 1020) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomUpdate) {
|
||||||
handleMsgType1020(messageEvent, text)
|
handleMsgType1020(messageEvent, text)
|
||||||
} else if (msgType == 1011) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeTakeOff) {
|
||||||
handleMsgType1011(messageEvent, text)
|
handleMsgType1011(messageEvent, text)
|
||||||
} else if (msgType == 1001) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeJoin) {
|
||||||
handleMsgType1001()
|
handleMsgType1001(messageEvent)
|
||||||
} else if (msgType == 1002) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQuit) {
|
||||||
handleMsgType1002(messageEvent, text)
|
handleMsgType1002(messageEvent, text)
|
||||||
} else if (msgType == 1029) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomRecieveInvitePk) {
|
||||||
handleMsgType1029(messageEvent, text)
|
handleMsgType1029(messageEvent, text)
|
||||||
} else if (msgType == 1021) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoom) {
|
||||||
handleMsgType1021(messageEvent, text)
|
handleMsgType1021(messageEvent, text)
|
||||||
} else if (msgType == 1036) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomOnline) {
|
||||||
handleMsgType1036(messageEvent, text)
|
handleMsgType1036(messageEvent, text)
|
||||||
} else if (msgType == 1049) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomFriendPartDidChanged) {
|
||||||
handleMsgType1049(messageEvent, text)
|
handleMsgType1049(messageEvent, text)
|
||||||
} else if (msgType == 1050) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomFriendDelayTime) {
|
||||||
handleMsgType1050(messageEvent, text)
|
handleMsgType1050(messageEvent, text)
|
||||||
} else if (msgType == 1051) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomFriendCreateRelation) {
|
||||||
handleMsgType1051(messageEvent, text)
|
handleMsgType1051(messageEvent, text)
|
||||||
} else if (msgType == 1052) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCabinTimeDelay) {
|
||||||
roomFragment!!.upCabinFragment(text.time_day)
|
roomFragment!!.upCabinFragment(text.time_day)
|
||||||
} else if (msgType == 1053) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSeatDidChanged) {
|
||||||
handleMsgType1053(messageEvent, text)
|
handleMsgType1053(messageEvent, text)
|
||||||
} else if (msgType == 1054) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeHeartDidChanged) {
|
||||||
handleMsgType1054(messageEvent, text)
|
handleMsgType1054(messageEvent, text)
|
||||||
} else if (msgType == 1055) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeHeartDid) {
|
||||||
handleMsgType1055(messageEvent)
|
handleMsgType1055(messageEvent)
|
||||||
} else if (msgType == 1035) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomDress) {
|
||||||
handleMsgType1035(messageEvent, text)
|
handleMsgType1035(messageEvent, text)
|
||||||
} else if (msgType == 1030 || msgType == 1031 || msgType == 1032 || msgType == 1033 || msgType == 1015 || msgType == 1037) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomPKAgreeOrRefuse
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomPKStart
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomPKEnd
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomPKDisconnect
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypePKValueDidChanged
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomOPK
|
||||||
|
) {
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
if (msgType == 1032 || msgType == 1033) {
|
if (msgType == EMMessageInfo.QXRoomMessageTypeRoomPKEnd
|
||||||
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomPKDisconnect
|
||||||
|
) {
|
||||||
setRoleType(3, -11)
|
setRoleType(3, -11)
|
||||||
}
|
}
|
||||||
} else if (msgType == 125) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeMuteRemoteAudio) {//pk 关闭对方麦
|
||||||
handleMsgType125(messageEvent, text.text)
|
handleMsgType125(messageEvent, text.text)
|
||||||
} else if (msgType == 1006) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSetManage) {
|
||||||
handleMsgType1006()
|
handleMsgType1006()
|
||||||
} else if (msgType == 1007) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSetCompere) {
|
||||||
handleMsgType1007()
|
handleMsgType1007()
|
||||||
} else if (msgType == 1017) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeManagerIsDelete) {
|
||||||
handleMsgType1017()
|
handleMsgType1017()
|
||||||
} else if (msgType == 1018) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCompereIsDelete) {
|
||||||
handleMsgType1018()
|
handleMsgType1018()
|
||||||
} else if (msgType == 126) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeMuteLocalAudio) { //小黑屋 关麦
|
||||||
handleMsgType126(messageEvent, text)
|
handleMsgType126(messageEvent, text)
|
||||||
} else if (msgType == 1034) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomMaiwrens) {
|
||||||
handleMsgType1034(messageEvent, text)
|
handleMsgType1034(messageEvent, text)
|
||||||
} else if (msgType == 1016) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomTypeDidChanged) {
|
||||||
handleMsgType1016(messageEvent, text)
|
handleMsgType1016(messageEvent, text)
|
||||||
} else if (msgType == 1039) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypehm) {
|
||||||
handleMsgType1039(messageEvent, text)
|
handleMsgType1039(messageEvent, text)
|
||||||
} else if (msgType == 1028) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomIsHostvalue) {
|
||||||
roomFragment!!.handleMsgType1028(messageEvent)
|
roomFragment!!.handleMsgType1028(messageEvent)
|
||||||
} else if (msgType == 1058) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypezailx) {
|
||||||
var userId = messageEvent!!.text!!.user_id!!
|
var userId = messageEvent!!.text!!.user_id!!
|
||||||
LogUtils.e("messageEvent!!.text.type" + messageEvent!!.text.type)
|
LogUtils.e("messageEvent!!.text.type" + messageEvent.text.type)
|
||||||
CommonAppContext.getInstance().onlineMap.set(
|
CommonAppContext.getInstance().onlineMap[userId ?: ""] = messageEvent.text.type
|
||||||
userId ?: "",
|
|
||||||
messageEvent!!.text.type
|
|
||||||
)
|
|
||||||
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
||||||
if (mRoomInfoResp!!.room_info.type_id == "1" || mRoomInfoResp!!.room_info.type_id == "3" ||
|
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"
|
mRoomInfoResp!!.room_info.type_id == "4" || mRoomInfoResp!!.room_info.type_id == "8"
|
||||||
@@ -1385,7 +1387,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
CommonAppContext.getInstance().getOnlineMap()
|
CommonAppContext.getInstance().getOnlineMap()
|
||||||
} else if (msgType == 1059) { // 1059清除个人魅力 1058在离线
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQingGRMl) { // 1059清除个人魅力 1058在离线
|
||||||
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
||||||
if (mRoomInfoResp!!.room_info.type_id == "1" || mRoomInfoResp!!.room_info.type_id == "3" ||
|
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"
|
mRoomInfoResp!!.room_info.type_id == "4" || mRoomInfoResp!!.room_info.type_id == "8"
|
||||||
@@ -1401,7 +1403,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (msgType == 1056) { // 1056 抽奖结果
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeMangH) { // 1056 抽奖结果
|
||||||
val dialog = supportFragmentManager
|
val dialog = supportFragmentManager
|
||||||
.findFragmentByTag("GiftLotteryDialog") as GiftLotteryDialog?
|
.findFragmentByTag("GiftLotteryDialog") as GiftLotteryDialog?
|
||||||
if (dialog != null && dialog.isVisible) {
|
if (dialog != null && dialog.isVisible) {
|
||||||
@@ -1419,7 +1421,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
releaseCountDownTimer1()
|
releaseCountDownTimer1()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (msgType == 1057) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeXlh) {
|
||||||
val existingFragment =
|
val existingFragment =
|
||||||
supportFragmentManager.findFragmentByTag("TourClubDialogFragment") as TourClubDialogFragment?
|
supportFragmentManager.findFragmentByTag("TourClubDialogFragment") as TourClubDialogFragment?
|
||||||
if (existingFragment != null && existingFragment.isVisible) {
|
if (existingFragment != null && existingFragment.isVisible) {
|
||||||
@@ -1430,9 +1432,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
xlhDjs(messageEvent.text.end_time)
|
xlhDjs(messageEvent.text.end_time)
|
||||||
|
|
||||||
} else if (msgType == 1060) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRed) {
|
||||||
qxRedPacketManager!!.addRedPacket(messageEvent.text.redpacketInfo)
|
qxRedPacketManager!!.addRedPacket(messageEvent.text.redpacketInfo)
|
||||||
} else if (msgType == 1061) {
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove) {
|
||||||
qxRedPacketManager!!.removeRedPacket(messageEvent.text.redpacket_id)
|
qxRedPacketManager!!.removeRedPacket(messageEvent.text.redpacket_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1519,16 +1521,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val pitMap: MutableMap<String, RoomPitBean> = HashMap()
|
private fun handleMsgType1039(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
|
|
||||||
fun handleMsgType1039(messageEvent: RoomMessageEvent, text: T?) {
|
|
||||||
if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) {
|
if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val pitList = mRoomInfoResp!!.room_info.pit_list
|
val pitList = mRoomInfoResp!!.room_info.pit_list
|
||||||
if (pitList != null && !pitList.isEmpty()) {
|
|
||||||
|
|
||||||
|
if (pitList != null && !pitList.isEmpty()) {
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1541,6 +1541,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
// 执行换麦逻辑
|
// 执行换麦逻辑
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun performSwitchMic(
|
private fun performSwitchMic(
|
||||||
@@ -1548,18 +1549,21 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
toPitNumber: String,
|
toPitNumber: String,
|
||||||
messageEvent: RoomMessageEvent
|
messageEvent: RoomMessageEvent
|
||||||
) {
|
) {
|
||||||
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
|
mRoomInfoResp!!.room_info.pit_list[toPitNumber.toInt() - 1] = getPitBean(messageEvent, 2)
|
||||||
|
mRoomInfoResp?.room_info?.pit_list!![fromPitNumber.toInt() - 1] = RoomPitBean()
|
||||||
|
|
||||||
|
if ("9" == toPitNumber && messageEvent.text.fromUserInfo.user_id == SpUtil.getUserId()) {
|
||||||
if ("9" == toPitNumber && messageEvent.text.user_id.equals(SpUtil.getUserId().toString())) {
|
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
|
||||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||||
ivSoundEffects(true)
|
ivSoundEffects(true)
|
||||||
|
setRoleType(3, mRoomInfoResp!!.user_info.pit_number)
|
||||||
} else {
|
} else {
|
||||||
if (customMusicFloatingView != null) {
|
if (customMusicFloatingView != null) {
|
||||||
customMusicFloatingView!!.destroy()
|
customMusicFloatingView!!.destroy()
|
||||||
AgoraManager.getInstance(this@RoomActivity).desMusic()
|
AgoraManager.getInstance(this@RoomActivity).desMusic()
|
||||||
isMusic = false
|
isMusic = false
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding!!.roomTop.rl.visibility = View.GONE
|
mBinding!!.roomTop.rl.visibility = View.GONE
|
||||||
ivSoundEffects(false)
|
ivSoundEffects(false)
|
||||||
}
|
}
|
||||||
@@ -1570,9 +1574,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||||
ivSoundEffects(true)
|
ivSoundEffects(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun hand1005(messageEvent: RoomMessageEvent, text: T?) {
|
private fun hand1005(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
@@ -1599,7 +1603,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
val userId2 = SpUtil.getUserId()
|
val userId2 = SpUtil.getUserId()
|
||||||
|
|
||||||
if (text.action == 1 && mRoomUserBean!!.user_id == userId2.toString() + "" && mRoomUserBean!!.pit_number == 9) {
|
if (text.action == 1 && mRoomUserBean!!.user_id == userId2 && mRoomUserBean!!.pit_number == 9) {
|
||||||
queren(text.fromUserInfo.nickname)
|
queren(text.fromUserInfo.nickname)
|
||||||
} else if (text.action == 4 && text.fromUserInfo.user_id == userId2) {
|
} else if (text.action == 4 && text.fromUserInfo.user_id == userId2) {
|
||||||
queren1(text.fromUserInfo.nickname)
|
queren1(text.fromUserInfo.nickname)
|
||||||
@@ -1653,13 +1657,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
private fun handleMsgType1003(messageEvent: RoomMessageEvent, text: T?) {
|
private fun handleMsgType1003(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
||||||
if (roomFragment == null) {
|
|
||||||
roomFragment = RoomFragment.newInstance(this, mRoomInfoResp)
|
|
||||||
supportFragmentManager
|
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.vp_room_pager, roomFragment!!)
|
|
||||||
.commitAllowingStateLoss()
|
|
||||||
}
|
|
||||||
|
|
||||||
val fromUserInfo = text.fromUserInfo ?: return
|
val fromUserInfo = text.fromUserInfo ?: return
|
||||||
|
|
||||||
@@ -1684,11 +1681,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
switchMic(2)
|
switchMic(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val typeId = mRoomInfoResp!!.room_info.type_id
|
val typeId = mRoomInfoResp!!.room_info.type_id
|
||||||
if ("2" == typeId) {
|
if ("2" == typeId) {
|
||||||
if ("9" == pitNumber) {
|
if ("9" == pitNumber) {
|
||||||
mRoomInfoResp!!.room_info.pit_list[0] = getPitBean(messageEvent)
|
mRoomInfoResp!!.room_info.pit_list[pitNumber.toInt() - 1] =
|
||||||
|
getPitBean(messageEvent, 1)
|
||||||
if (mRoomInfoResp!!.user_info != null) {
|
if (mRoomInfoResp!!.user_info != null) {
|
||||||
mRoomInfoResp!!.user_info.pit_number = pitNumber.toInt()
|
mRoomInfoResp!!.user_info.pit_number = pitNumber.toInt()
|
||||||
}
|
}
|
||||||
@@ -1700,10 +1697,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if ("2" == labelId) {
|
if ("2" == labelId) {
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
} else if ("1" == labelId) {
|
} else if ("1" == labelId) {
|
||||||
mRoomInfoResp!!.room_info.pit_list.set(
|
mRoomInfoResp!!.room_info.pit_list[pitNumber.toInt() - 1] =
|
||||||
pitNumber.toInt() - 1,
|
getPitBean(messageEvent, 1)
|
||||||
getPitBean(messageEvent)
|
|
||||||
)
|
|
||||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
}
|
}
|
||||||
@@ -1726,21 +1721,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
val userId = fromUserInfo.user_id
|
val userId = fromUserInfo.user_id
|
||||||
val currentUserId = SpUtil.getUserId()
|
val currentUserId = SpUtil.getUserId()
|
||||||
|
|
||||||
if (userId == currentUserId) {
|
|
||||||
aBoolean = true
|
|
||||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
|
||||||
setBoolean(aBoolean)
|
|
||||||
if (mRoomInfoResp!!.user_info != null) {
|
|
||||||
mRoomInfoResp!!.user_info.pit_number = 0
|
|
||||||
}
|
|
||||||
setRoleType(0, 0)
|
|
||||||
switchMic(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pitNumber == "9") {
|
|
||||||
ivSoundEffects(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userId == currentUserId && "9" == pitNumber) {
|
if (userId == currentUserId && "9" == pitNumber) {
|
||||||
if (customMusicFloatingView != null) {
|
if (customMusicFloatingView != null) {
|
||||||
customMusicFloatingView!!.destroy()
|
customMusicFloatingView!!.destroy()
|
||||||
@@ -1748,45 +1728,51 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
isMusic = false
|
isMusic = false
|
||||||
}
|
}
|
||||||
mBinding!!.roomTop.rl.visibility = View.GONE
|
mBinding!!.roomTop.rl.visibility = View.GONE
|
||||||
|
mRoomInfoResp?.user_info?.pit_number = 0
|
||||||
ivSoundEffects(false)
|
ivSoundEffects(false)
|
||||||
|
} else if (userId == currentUserId) {
|
||||||
|
aBoolean = true
|
||||||
|
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
||||||
|
setBoolean(aBoolean)
|
||||||
|
setRoleType(0, 0)
|
||||||
|
switchMic(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
val typeId = mRoomInfoResp!!.room_info.type_id
|
val typeId = mRoomInfoResp!!.room_info.type_id
|
||||||
if ("2" == typeId) {
|
val roomType = RoomType.fromTypeId(typeId)
|
||||||
if ("9" == pitNumber) {
|
|
||||||
if (userId == currentUserId) {
|
|
||||||
mRoomInfoResp!!.room_info.pit_list[0] = getPitBean2(messageEvent, "9")
|
when (roomType) {
|
||||||
if (mRoomInfoResp!!.user_info != null) {
|
RoomType.AUCTION -> {
|
||||||
mRoomInfoResp!!.user_info.pit_number = 0
|
if ("9" == pitNumber) {
|
||||||
|
if (userId == currentUserId) {
|
||||||
|
if (mRoomInfoResp!!.user_info != null) {
|
||||||
|
mRoomInfoResp!!.user_info.pit_number = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ("888" == pitNumber) {
|
||||||
|
mRoomInfoResp!!.room_auction = null
|
||||||
|
if (userId == currentUserId) {
|
||||||
|
setRoleType(0, 0)
|
||||||
|
switchMic(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("888" == pitNumber) {
|
|
||||||
mRoomInfoResp!!.room_auction = null
|
|
||||||
if (userId == currentUserId) {
|
|
||||||
setRoleType(0, 0)
|
|
||||||
switchMic(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
|
||||||
} else if ("3" == typeId || "4" == typeId || "1" == typeId || "8" == typeId) {
|
|
||||||
val labelId = mRoomInfoResp!!.room_info.label_id
|
|
||||||
if ("2" == labelId) {
|
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
|
||||||
} else if ("1" == labelId) {
|
|
||||||
mRoomInfoResp!!.room_info.pit_list.set(
|
|
||||||
pitNumber.toInt() - 1,
|
|
||||||
getPitBean2(messageEvent, pitNumber)
|
|
||||||
)
|
|
||||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
}
|
||||||
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId().toString() + "") {
|
|
||||||
ivSoundEffects(false)
|
RoomType.DATING -> {
|
||||||
|
val labelId = mRoomInfoResp!!.room_info.label_id
|
||||||
|
if ("1" == labelId) {
|
||||||
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||||
|
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||||
|
ivSoundEffects(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
roomFragment!!.handleRoomMessage(messageEvent)
|
else -> {}
|
||||||
}
|
}
|
||||||
|
roomFragment!!.handleRoomMessage(messageEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleMsgType1022(messageEvent: RoomMessageEvent, text: T?) {
|
private fun handleMsgType1022(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
@@ -1798,10 +1784,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
if (text.type == 1) {
|
if (text.type == 1) {
|
||||||
if ("888" == pitNumber) {
|
if ("888" == pitNumber) {
|
||||||
var type = -1
|
|
||||||
if ("2" == mRoomInfoResp!!.room_info.type_id) {
|
|
||||||
type = if ("1" == mRoomInfoResp!!.room_info.label_id) 1 else 2
|
|
||||||
}
|
|
||||||
if (userId == currentUserId) {
|
if (userId == currentUserId) {
|
||||||
setRoleType(3, 888)
|
setRoleType(3, 888)
|
||||||
switchMic(2)
|
switchMic(2)
|
||||||
@@ -1852,7 +1834,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
mRoomBean = text.roomInfo
|
mRoomBean = text.roomInfo
|
||||||
EventBus.getDefault().post(mRoomBean)
|
EventBus.getDefault().post(mRoomBean)
|
||||||
changeBackgroundColor(mRoomBean?.getRoom_background())
|
changeBackgroundColor(mRoomBean?.room_background)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleMsgType1011(messageEvent: RoomMessageEvent, text: T?) {
|
private fun handleMsgType1011(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
@@ -1867,9 +1849,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleMsgType1001() {
|
private fun handleMsgType1001(messageEvent: RoomMessageEvent) {
|
||||||
number++
|
if (messageEvent.text.fromUserInfo.user_id != SpUtil.getUserId()) {
|
||||||
mBinding!!.roomTop.tvNum.text = number.toString() + ""
|
number++
|
||||||
|
}
|
||||||
|
mBinding!!.roomTop.tvNum.text = number.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleMsgType1002(messageEvent: RoomMessageEvent, text: T?) {
|
private fun handleMsgType1002(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
@@ -1877,7 +1861,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if (number < 0) {
|
if (number < 0) {
|
||||||
number = 0
|
number = 0
|
||||||
}
|
}
|
||||||
mBinding!!.roomTop.tvNum.text = number.toString() + ""
|
mBinding!!.roomTop.tvNum.text = number.toString()
|
||||||
if (text == null || text.fromUserInfo == null) return
|
if (text == null || text.fromUserInfo == null) return
|
||||||
if (text.fromUserInfo.user_id == SpUtil.getUserId()) {
|
if (text.fromUserInfo.user_id == SpUtil.getUserId()) {
|
||||||
MessageListenerSingleton.quitGroup(roomId);
|
MessageListenerSingleton.quitGroup(roomId);
|
||||||
@@ -1889,9 +1873,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
private fun handleMsgType1029(messageEvent: RoomMessageEvent, text: T?) {
|
private fun handleMsgType1029(messageEvent: RoomMessageEvent, text: T?) {
|
||||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.user_info == null) return
|
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.user_info == null) return
|
||||||
|
|
||||||
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||||
.toString() + ""
|
|
||||||
) {
|
|
||||||
querenPk(text.text, text.pkId)
|
querenPk(text.text, text.pkId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1921,14 +1903,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
if (mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
||||||
|
|
||||||
val pitList = mRoomInfoResp!!.room_info.pit_list ?: return
|
val pitList = mRoomInfoResp!!.room_info.pit_list ?: return
|
||||||
|
pitList.forEach { roomPitBean ->
|
||||||
for (roomPitBean in pitList) {
|
|
||||||
roomPitBean.charm = charm
|
roomPitBean.charm = charm
|
||||||
try {
|
|
||||||
pitList[roomPitBean.pit_number.toInt() - 1] = roomPitBean
|
|
||||||
} catch (e: NumberFormatException) {
|
|
||||||
// Handle exception
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2171,9 +2147,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/6/30 上麦,麦位变化
|
// TODO: 2025/6/30 上麦,麦位变化
|
||||||
private fun getPitBean(messageEvent: RoomMessageEvent): RoomPitBean {
|
private fun getPitBean(messageEvent: RoomMessageEvent, type: Int): RoomPitBean {
|
||||||
val pitBean = RoomPitBean()
|
val pitBean = RoomPitBean()
|
||||||
pitBean.pit_number = messageEvent.text.pit_number
|
if (type == 1) {
|
||||||
|
pitBean.pit_number = messageEvent.text.pit_number
|
||||||
|
} else {
|
||||||
|
pitBean.pit_number = messageEvent.text.to_pit_number
|
||||||
|
}
|
||||||
pitBean.user_id = messageEvent.text.fromUserInfo.user_id.toString() + ""
|
pitBean.user_id = messageEvent.text.fromUserInfo.user_id.toString() + ""
|
||||||
pitBean.avatar = messageEvent.text.fromUserInfo.avatar
|
pitBean.avatar = messageEvent.text.fromUserInfo.avatar
|
||||||
pitBean.nickname = messageEvent.text.fromUserInfo.nickname
|
pitBean.nickname = messageEvent.text.fromUserInfo.nickname
|
||||||
@@ -2183,19 +2163,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
return pitBean
|
return pitBean
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/6/30 下麦麦位变化
|
|
||||||
private fun getPitBean2(messageEvent: RoomMessageEvent?, number: String): RoomPitBean {
|
|
||||||
val pitBean = RoomPitBean()
|
|
||||||
pitBean.pit_number = if (messageEvent != null) messageEvent.text.pit_number else number
|
|
||||||
pitBean.user_id = ""
|
|
||||||
pitBean.avatar = ""
|
|
||||||
pitBean.nickname = ""
|
|
||||||
pitBean.sex = ""
|
|
||||||
pitBean.charm = ""
|
|
||||||
pitBean.is_pm = 1
|
|
||||||
return pitBean
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun querenPk(text: String, pk_id: String) {
|
private fun querenPk(text: String, pk_id: String) {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
val dialog = ConfirmDialog(
|
val dialog = ConfirmDialog(
|
||||||
@@ -2236,7 +2203,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setOnlineNumber(number: Int) {
|
fun setOnlineNumber(number: Int) {
|
||||||
mBinding!!.roomTop.tvNum.text = number.toString() + ""
|
this.number = number
|
||||||
|
mBinding!!.roomTop.tvNum.text = number.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setUserInfo() {
|
fun setUserInfo() {
|
||||||
@@ -2259,21 +2227,18 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if (id == R.id.btn_follow) {
|
if (id == R.id.btn_follow) {
|
||||||
MvpPre!!.userGuanz(mRoomInfoResp!!.room_info.room_id, "2")
|
MvpPre!!.userGuanz(mRoomInfoResp!!.room_info.room_id, "2")
|
||||||
} else if (id == R.id.btn_notice) {
|
} else if (id == R.id.btn_notice) {
|
||||||
// RoomTipsView.show(this,view,"公告","公告内容");
|
|
||||||
val roomNoticeDialogFragment = RoomNoticeDialogFragment(this)
|
val roomNoticeDialogFragment = RoomNoticeDialogFragment(this)
|
||||||
roomNoticeDialogFragment.setTitle("公告")
|
roomNoticeDialogFragment.setTitle("公告")
|
||||||
roomNoticeDialogFragment.setContent(mRoomBean!!.room_intro)
|
roomNoticeDialogFragment.setContent(mRoomBean!!.room_intro)
|
||||||
roomNoticeDialogFragment.show()
|
roomNoticeDialogFragment.show()
|
||||||
addActiveDialog(roomNoticeDialogFragment)
|
addActiveDialog(roomNoticeDialogFragment)
|
||||||
} else if (id == R.id.btn_ranking) { //排行榜
|
} else if (id == R.id.btn_ranking) { //排行榜
|
||||||
// RoomChartsFragment.newInstance(roomId).show(getSupportFragmentManager(), "RoomChartsFragment");
|
|
||||||
val fragment = RoomChartsFragment.newInstance(roomId, mRoomInfoResp)
|
val fragment = RoomChartsFragment.newInstance(roomId, mRoomInfoResp)
|
||||||
fragment.show(supportFragmentManager, "RoomChartsFragment")
|
fragment.show(supportFragmentManager, "RoomChartsFragment")
|
||||||
addActiveDialogFragment(fragment)
|
addActiveDialogFragment(fragment)
|
||||||
} else if (id == R.id.btn_close_live) { //退出房间
|
} else if (id == R.id.btn_close_live) { //退出房间
|
||||||
showExitRoomDialog()
|
showExitRoomDialog()
|
||||||
} else if (id == R.id.tv_num) {
|
} else if (id == R.id.tv_num) {
|
||||||
// RoomOnlineDialogFragment.show(roomId, "", mRoomUserBean, mRoomInfoResp, getSupportFragmentManager());
|
|
||||||
val fragment = RoomOnlineDialogFragment.show(
|
val fragment = RoomOnlineDialogFragment.show(
|
||||||
roomId, "", mRoomUserBean, mRoomInfoResp,
|
roomId, "", mRoomUserBean, mRoomInfoResp,
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
@@ -2299,10 +2264,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if (mRoomInfoResp!!.user_info.is_mute == "1") {
|
if (mRoomInfoResp!!.user_info.is_mute == "1") {
|
||||||
ToastUtils.show("您已经被禁言")
|
ToastUtils.show("您已经被禁言")
|
||||||
} else {
|
} else {
|
||||||
// mBinding.llInput.setVisibility(View.VISIBLE);
|
|
||||||
// mBinding.inputMenu1.bringToFront(); // 强制将该 View 置于最上层
|
|
||||||
// mBinding.inputMenu1.show();
|
|
||||||
|
|
||||||
dialogDismiss(1)
|
dialogDismiss(1)
|
||||||
}
|
}
|
||||||
} else if (id == R.id.rl_mic) {
|
} else if (id == R.id.rl_mic) {
|
||||||
@@ -2316,7 +2277,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (id == R.id.rl_sett) { //房间设置
|
} else if (id == R.id.rl_sett) { //房间设置
|
||||||
// RoomSettingFragment.show(mRoomInfoResp, getSupportFragmentManager());
|
|
||||||
if (mRoomInfoResp == null) {
|
if (mRoomInfoResp == null) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请稍后再试")
|
com.blankj.utilcode.util.ToastUtils.showShort("请稍后再试")
|
||||||
return
|
return
|
||||||
@@ -2338,7 +2298,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
AgoraManager.getInstance(this).muteSpeaker(!voive)
|
AgoraManager.getInstance(this).muteSpeaker(!voive)
|
||||||
} else if (id == R.id.rl_more) { //点击PK
|
} else if (id == R.id.rl_more) { //点击PK
|
||||||
// RoomPkDialogFragment.newInstance(roomId, SpUtil.getUserId() + "", mRoomInfoResp.getRoom_info().getIs_pk()).show(getSupportFragmentManager(), "RoomPkDialogFragment");
|
|
||||||
val fragment = RoomPkDialogFragment.newInstance(
|
val fragment = RoomPkDialogFragment.newInstance(
|
||||||
roomId,
|
roomId,
|
||||||
SpUtil.getUserId().toString() + "",
|
SpUtil.getUserId().toString() + "",
|
||||||
@@ -2347,7 +2306,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
fragment.show(supportFragmentManager, "RoomPkDialogFragment")
|
fragment.show(supportFragmentManager, "RoomPkDialogFragment")
|
||||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||||
} else if (id == R.id.rl_message) {
|
} else if (id == R.id.rl_message) {
|
||||||
// RoomMessageDialogFragment.show(getSupportFragmentManager());
|
|
||||||
val fragment = RoomMessageDialogFragment.show(
|
val fragment = RoomMessageDialogFragment.show(
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
)
|
)
|
||||||
@@ -2355,13 +2313,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||||
}
|
}
|
||||||
} else if (id == R.id.rl_misc) { //设置点歌
|
} else if (id == R.id.rl_misc) { //设置点歌
|
||||||
val fragment = RequestDialogFragment.show(
|
val fragment = RequestDialogFragment.show(
|
||||||
roomId, mRoomInfoResp, 1,
|
roomId, mRoomInfoResp, 1,
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
)
|
)
|
||||||
if (fragment != null) {
|
if (fragment != null) {
|
||||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||||
}
|
}
|
||||||
} else if (id == R.id.rl_gift) { //礼物
|
} else if (id == R.id.rl_gift) { //礼物
|
||||||
val fragment = RoomGiftDialogFragment.show(
|
val fragment = RoomGiftDialogFragment.show(
|
||||||
mRoomInfoResp, null, roomId, 0, "",
|
mRoomInfoResp, null, roomId, 0, "",
|
||||||
@@ -2387,10 +2345,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
if (mRoomInfoResp!!.room_info.room_up_pit_type == "1") {
|
if (mRoomInfoResp!!.room_info.room_up_pit_type == "1") {
|
||||||
if (aBoolean) {
|
if (aBoolean) {
|
||||||
MvpPre!!.applyPit(roomId, "")
|
MvpPre!!.applyPit(roomId, "")
|
||||||
// aBoolean = false;
|
|
||||||
} else {
|
} else {
|
||||||
MvpPre!!.downPit(roomId, "")
|
MvpPre!!.downPit(roomId, "")
|
||||||
// aBoolean = true;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (aBoolean) {
|
if (aBoolean) {
|
||||||
@@ -2752,7 +2708,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
rl_more?.visibility = View.GONE
|
rl_more?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("1"==typeId && "2" == labelId){
|
if ("1" == typeId && "2" == labelId) {
|
||||||
rl_misc?.visibility = View.VISIBLE
|
rl_misc?.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2911,9 +2867,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
fun upRoomInfo(resp: RoomInfoResp?) {
|
fun upRoomInfo(resp: RoomInfoResp?) {
|
||||||
this.mRoomInfoResp = resp
|
this.mRoomInfoResp = resp
|
||||||
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||||
.toString() + ""
|
|
||||||
) {
|
|
||||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||||
ivSoundEffects(true)
|
ivSoundEffects(true)
|
||||||
} else {
|
} else {
|
||||||
@@ -2931,7 +2885,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
this.mRoomBean = roomBean
|
this.mRoomBean = roomBean
|
||||||
this.mRoomUserBean = resp.user_info
|
this.mRoomUserBean = resp.user_info
|
||||||
this.mRoomOwnerBean = resp.room_owner
|
this.mRoomOwnerBean = resp.room_owner
|
||||||
this.mPitList = mRoomBean!!.pit_list
|
|
||||||
this.roomId = roomBean.room_id
|
this.roomId = roomBean.room_id
|
||||||
MessageListenerSingleton.getInstance().joinGroup(roomId) //加入房间im
|
MessageListenerSingleton.getInstance().joinGroup(roomId) //加入房间im
|
||||||
ImageUtils.loadHeadCC(resp.room_info.room_cover, mBinding!!.roomTop.avatar)
|
ImageUtils.loadHeadCC(resp.room_info.room_cover, mBinding!!.roomTop.avatar)
|
||||||
@@ -3011,9 +2964,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
instView()
|
instView()
|
||||||
|
|
||||||
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
if (mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||||
.toString() + ""
|
|
||||||
) {
|
|
||||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||||
ivSoundEffects(true)
|
ivSoundEffects(true)
|
||||||
} else {
|
} else {
|
||||||
@@ -3071,7 +3022,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()
|
||||||
.toString() + "" && mRoomInfoResp!!.user_info.pit_number == 9 && mRoomInfoResp!!.room_info.type_id != "2" && mRoomInfoResp!!.room_info.type_id != "6"
|
&& mRoomInfoResp!!.user_info.pit_number == 9
|
||||||
|
&& mRoomInfoResp!!.room_info.type_id != "2"
|
||||||
|
&& mRoomInfoResp!!.room_info.type_id != "6"
|
||||||
) {
|
) {
|
||||||
rlMore(true)
|
rlMore(true)
|
||||||
} else {
|
} else {
|
||||||
@@ -3820,6 +3773,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun clearUserCharm() {
|
override fun clearUserCharm() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun userOnlineStatus(list: List<UserOnlineStatusBean>) {
|
override fun userOnlineStatus(list: List<UserOnlineStatusBean>) {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
|||||||
public void songList(List<MusicSongBean> musicSongBeans) {
|
public void songList(List<MusicSongBean> musicSongBeans) {
|
||||||
|
|
||||||
|
|
||||||
if (roomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getPit_number() == 9) {
|
if (roomInfoResp.getUser_info().getUser_id() == SpUtil.getUserId() && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||||
status = 1;
|
status = 1;
|
||||||
}
|
}
|
||||||
if (musicSongBeans != null) {
|
if (musicSongBeans != null) {
|
||||||
|
|||||||
@@ -565,7 +565,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
|||||||
} else {
|
} else {
|
||||||
((RoomActivity) getActivity()).ivSoundEffects(false);
|
((RoomActivity) getActivity()).ivSoundEffects(false);
|
||||||
}
|
}
|
||||||
if (mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && mRoomInfoResp.getUser_info().getPit_number() == 9
|
if (mRoomInfoResp.getUser_info().getUser_id() == SpUtil.getUserId() && mRoomInfoResp.getUser_info().getPit_number() == 9
|
||||||
&& !mRoomInfoResp.getRoom_info().getType_id().equals("2") && !mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
&& !mRoomInfoResp.getRoom_info().getType_id().equals("2") && !mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||||
((RoomActivity) getActivity()).rlMore(true);
|
((RoomActivity) getActivity()).rlMore(true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -425,25 +425,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void isWhether2() {
|
private void isWhether2() {
|
||||||
// 判断是否包含
|
|
||||||
boolean isContained = false;
|
|
||||||
for (int i = 0; i < flexboxLayout.getChildCount(); i++) {
|
|
||||||
if (flexboxLayout.getChildAt(i) == WheatLayoutSingManager.Companion.getInstance().getRootContainer()) {
|
|
||||||
isContained = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isContained) {
|
|
||||||
Log.d("FlexboxLayout", "包含 wheatContainer");
|
|
||||||
// 执行相关操作
|
|
||||||
} else {
|
|
||||||
Log.d("FlexboxLayout", "不包含 wheatContainer");
|
|
||||||
// 可以添加
|
|
||||||
flexboxLayout.addView(WheatLayoutSingManager.Companion.getInstance().getRootContainer());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
flexboxLayout.setVisibility(View.VISIBLE);
|
flexboxLayout.setVisibility(View.VISIBLE);
|
||||||
mBinding.cl.setVisibility(View.GONE);
|
mBinding.cl.setVisibility(View.GONE);
|
||||||
|
|
||||||
@@ -671,10 +652,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postAgora(PkSwTokenBean pkSwTokenBean) {
|
public void postAgora(PkSwTokenBean pkSwTokenBean) {
|
||||||
String pkUserId = "";
|
int pkUserId = -1;
|
||||||
String pkRoomId = "";
|
String pkRoomId = "";
|
||||||
if (roomInfoRespPk.getPk_info() != null) {
|
if (roomInfoRespPk.getPk_info() != null) {
|
||||||
if (roomInfoRespPk.getPk_info().getInvite_pk_user_id().equals(SpUtil.getUserId() + "")) {
|
if (roomInfoRespPk.getPk_info().getInvite_pk_user_id() == SpUtil.getUserId()) {
|
||||||
pkUserId = roomInfoRespPk.getPk_info().getReceive_pk_user_id();
|
pkUserId = roomInfoRespPk.getPk_info().getReceive_pk_user_id();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -690,9 +671,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void pkView() {
|
private void pkView() {
|
||||||
if (wheatLayoutSingManager != null) {
|
|
||||||
wheatLayoutSingManager.release();
|
|
||||||
}
|
|
||||||
flexboxLayout.setVisibility(View.GONE);
|
flexboxLayout.setVisibility(View.GONE);
|
||||||
mBinding.cl.setVisibility(VISIBLE);
|
mBinding.cl.setVisibility(VISIBLE);
|
||||||
FlexboxLayout flexboxLayout1 = mBinding.flexboxLayout1;
|
FlexboxLayout flexboxLayout1 = mBinding.flexboxLayout1;
|
||||||
@@ -876,7 +854,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Objects.equals(roomInfoResp.getUser_info().getUser_id(), roomInfoResp.getPk_info().getInvite_pk_user_id() != null ? roomInfoResp.getPk_info().getInvite_pk_user_id() : "0")) {
|
if (roomInfoResp.getUser_info().getUser_id() == roomInfoResp.getPk_info().getInvite_pk_user_id()) {
|
||||||
|
|
||||||
mBinding.btStop.setVisibility(VISIBLE);
|
mBinding.btStop.setVisibility(VISIBLE);
|
||||||
mBinding.btSta.setVisibility(View.VISIBLE);
|
mBinding.btSta.setVisibility(View.VISIBLE);
|
||||||
@@ -1255,7 +1233,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
/// 1037
|
/// 1037
|
||||||
public void event1037(RoomMessageEvent message) {
|
public void event1037(RoomMessageEvent message) {
|
||||||
if (roomInfoResp.getUser_info().getPit_number() == 9 && roomInfoRespPk.getPk_info().getInvite_pk_user_id().equals(message.getText().getFromUserInfo().getUser_id() + "")) {
|
if (roomInfoResp.getUser_info().getPit_number() == 9 && roomInfoRespPk.getPk_info().getInvite_pk_user_id() == message.getText().getFromUserInfo().getUser_id()) {
|
||||||
queren();
|
queren();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postRoomSwToken(String roomId,int uid,String invite_pk_user_id) {
|
public void postRoomSwToken(String roomId,int uid,int invite_pk_user_id) {
|
||||||
RetrofitClient.getInstance().postRoomSwToken(roomId, new BaseObserver<PkSwTokenBean>() {
|
RetrofitClient.getInstance().postRoomSwToken(roomId, new BaseObserver<PkSwTokenBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import android.view.View;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.xscm.modulemain.R;
|
import com.xscm.modulemain.R;
|
||||||
@@ -32,6 +35,20 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
super(R.layout.room_rv_item_gift_wheat);
|
super(R.layout.room_rv_item_gift_wheat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convertPayloads(@NonNull BaseViewHolder helper, RewardUserBean item, @NonNull List<Object> payloads) {
|
||||||
|
super.convertPayloads(helper, item, payloads);
|
||||||
|
helper.setVisible(R.id.riv_pit, item.isSelect());
|
||||||
|
TextView tvPit = helper.getView(R.id.tv_pit);
|
||||||
|
if (item.isSelect()) {
|
||||||
|
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show);
|
||||||
|
tvPit.setTextColor(Color.parseColor("#ffffff"));
|
||||||
|
} else {
|
||||||
|
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show_b);
|
||||||
|
tvPit.setTextColor(Color.parseColor("#ff333333"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void convert(BaseViewHolder helper, RewardUserBean item) {
|
protected void convert(BaseViewHolder helper, RewardUserBean item) {
|
||||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.riv_gift_wheat_head_pic));
|
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.riv_gift_wheat_head_pic));
|
||||||
@@ -115,18 +132,6 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<RewardUserBean> getSelectRoomPitUserModel() {
|
|
||||||
List<RewardUserBean> selects = getData();
|
|
||||||
List<RewardUserBean> data = getData();
|
|
||||||
for (RewardUserBean item : data) {
|
|
||||||
if (item.isSelect()) {
|
|
||||||
selects.add(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return selects;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserIdToString() {
|
public String getUserIdToString() {
|
||||||
List<RewardUserBean> data = getData();
|
List<RewardUserBean> data = getData();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -98,12 +98,12 @@ public class RoomOnlineAdapter extends BaseMultiItemQuickAdapter<RoomOnlineBean,
|
|||||||
if (url.contains("http")) {
|
if (url.contains("http")) {
|
||||||
ImageView imageView1 = new ImageView(helper.itemView.getContext());
|
ImageView imageView1 = new ImageView(helper.itemView.getContext());
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||||
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_57),
|
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_56),
|
||||||
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_14)
|
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||||
);
|
);
|
||||||
params.setMargins(0, 0, helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
params.setMargins(0, 0, helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||||
imageView1.setLayoutParams(params);
|
imageView1.setLayoutParams(params);
|
||||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||||
|
|
||||||
// 使用 Glide 加载图片
|
// 使用 Glide 加载图片
|
||||||
ImageUtils.loadHeadCC(url, imageView1);
|
ImageUtils.loadHeadCC(url, imageView1);
|
||||||
|
|||||||
@@ -367,6 +367,14 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
mBinding.tvBbQs.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
mBinding.tvBbQs.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||||
|
|
||||||
mBinding.tvBbQs.setOnClickListener(this::onClisk);
|
mBinding.tvBbQs.setOnClickListener(this::onClisk);
|
||||||
|
|
||||||
|
mBinding.container.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onClisk(View view1) {
|
private void onClisk(View view1) {
|
||||||
|
|||||||
@@ -336,21 +336,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
contentView.findViewById(R.id.action_set_host).setVisibility(GONE);
|
contentView.findViewById(R.id.action_set_host).setVisibility(GONE);
|
||||||
contentView.findViewById(R.id.action_kick_out).setVisibility(VISIBLE);
|
contentView.findViewById(R.id.action_kick_out).setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (type != 1) {
|
|
||||||
// contentView.findViewById(R.id.action_set_manager).setVisibility(GONE);
|
|
||||||
// contentView.findViewById(R.id.action_kick_out).setVisibility(GONE);
|
|
||||||
// }
|
|
||||||
// if (type != 1 && type != 2) {
|
|
||||||
// contentView.findViewById(R.id.action_set_host).setVisibility(GONE);
|
|
||||||
// contentView.findViewById(R.id.action_kick_out).setVisibility(GONE);
|
|
||||||
// }
|
|
||||||
// if (paim==1){
|
|
||||||
// contentView.findViewById(R.id.action_kick_out).setVisibility(GONE);
|
|
||||||
// }else {
|
|
||||||
// contentView.findViewById(R.id.action_kick_out).setVisibility(VISIBLE);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getValue(int type, String key) {
|
private String getValue(int type, String key) {
|
||||||
@@ -391,10 +376,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
@Override
|
@Override
|
||||||
public void getRoomUserInfo(UserInfo userInfo1) {
|
public void getRoomUserInfo(UserInfo userInfo1) {
|
||||||
this.userInfo = userInfo1;
|
this.userInfo = userInfo1;
|
||||||
// if (paim==1){
|
|
||||||
// userInfo.setAuction_id(isNum+"");
|
|
||||||
// }
|
|
||||||
// ImageUtils.loadHeadCC(userInfo.getAvatar(), mBinding.ivAvatar);
|
|
||||||
mBinding.ivAvatar.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
mBinding.ivAvatar.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
||||||
mBinding.tvName.setText(userInfo.getNickname());
|
mBinding.tvName.setText(userInfo.getNickname());
|
||||||
mBinding.tvId.setText("ID:" + userInfo.getUser_code());
|
mBinding.tvId.setText("ID:" + userInfo.getUser_code());
|
||||||
@@ -410,12 +391,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.imRoomGz.setImageDrawable(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.room_gz));
|
mBinding.imRoomGz.setImageDrawable(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.room_gz));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (userInfo.getRoom_id().equals(room_id)){
|
|
||||||
// mBinding.imGs.setVisibility(GONE);
|
|
||||||
// }else {
|
|
||||||
// mBinding.imGs.setVisibility(View.VISIBLE);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (userInfo.getIs_room_owner().equals("1")) {
|
if (userInfo.getIs_room_owner().equals("1")) {
|
||||||
close_type = 1;
|
close_type = 1;
|
||||||
} else if (userInfo.getIs_manager().equals("1")) {
|
} else if (userInfo.getIs_manager().equals("1")) {
|
||||||
@@ -426,16 +401,12 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
close_type = 4;
|
close_type = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (user_id.equals(SpUtil.getUserId()+"")){
|
|
||||||
// mBinding.tvGh.setVisibility(GONE);
|
|
||||||
// }else {
|
|
||||||
if (userInfo != null) {
|
if (userInfo != null) {
|
||||||
mBinding.tvGh.setVisibility(VISIBLE);
|
mBinding.tvGh.setVisibility(VISIBLE);
|
||||||
mBinding.tvGh.setText("所属公会:" + ((userInfo.getGuild() != null && !userInfo.getGuild().isEmpty()) ? userInfo.getGuild() : "无"));
|
mBinding.tvGh.setText("所属公会:" + ((userInfo.getGuild() != null && !userInfo.getGuild().isEmpty()) ? userInfo.getGuild() : "无"));
|
||||||
} else {
|
} else {
|
||||||
mBinding.tvGh.setVisibility(GONE);
|
mBinding.tvGh.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
mBinding.tvTs.setText(String.format("90天内累计收到 %s 个礼物", userInfo.getGift_num()));
|
mBinding.tvTs.setText(String.format("90天内累计收到 %s 个礼物", userInfo.getGift_num()));
|
||||||
|
|
||||||
updateUIBasedOnTypeAndUser();
|
updateUIBasedOnTypeAndUser();
|
||||||
@@ -450,7 +421,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
||||||
mBinding.ll.setVisibility(VISIBLE);
|
mBinding.ll.setVisibility(VISIBLE);
|
||||||
mBinding.ll.setBackgroundResource(com.xscm.moduleutil.R.mipmap.guxi_k);
|
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);
|
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar1(), mBinding.userNav1);
|
||||||
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar2(), mBinding.userNav2);
|
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar2(), mBinding.userNav2);
|
||||||
mBinding.tvNickname1.setText(userInfo.getQinmi().getNickname1());
|
mBinding.tvNickname1.setText(userInfo.getQinmi().getNickname1());
|
||||||
@@ -548,11 +518,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomJb.setVisibility(GONE);
|
mBinding.roomJb.setVisibility(GONE);
|
||||||
mBinding.roomLh.setVisibility(GONE);
|
mBinding.roomLh.setVisibility(GONE);
|
||||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||||
// if (isNum==1){
|
|
||||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
|
||||||
// }else {
|
|
||||||
// mBinding.roomMCz.setVisibility(GONE);
|
|
||||||
// }
|
|
||||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
if (userInfo.getIs_in_pit() == 1) {
|
if (userInfo.getIs_in_pit() == 1) {
|
||||||
mBinding.roomMCz.setText("下麦");
|
mBinding.roomMCz.setText("下麦");
|
||||||
@@ -586,11 +552,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.roomJb.setVisibility(GONE);
|
mBinding.roomJb.setVisibility(GONE);
|
||||||
mBinding.roomLh.setVisibility(GONE);
|
mBinding.roomLh.setVisibility(GONE);
|
||||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||||
// if (isNum==1){
|
|
||||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
|
||||||
// }else {
|
|
||||||
// mBinding.roomMCz.setVisibility(GONE);
|
|
||||||
// }
|
|
||||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||||
if (userInfo.getIs_in_pit() == 1) {
|
if (userInfo.getIs_in_pit() == 1) {
|
||||||
mBinding.roomMCz.setText("下麦");
|
mBinding.roomMCz.setText("下麦");
|
||||||
|
|||||||
@@ -92,26 +92,6 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<!-- <com.example.moduletablayout.CustomSlidingTabLayout-->
|
|
||||||
<!-- android:id="@+id/sliding_tab_layout"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_marginLeft="@dimen/dp_16"-->
|
|
||||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
|
||||||
<!-- android:layout_marginRight="@dimen/dp_16"-->
|
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@+id/cl_2"-->
|
|
||||||
<!-- app:tl_indicator_corner_radius="@dimen/dp_3"-->
|
|
||||||
<!-- app:tl_indicator_drawable="@drawable/index_bg_indicator"-->
|
|
||||||
<!-- app:tl_indicator_height="@dimen/dp_6"-->
|
|
||||||
<!-- app:tl_indicator_margin_bottom="@dimen/dp_3"-->
|
|
||||||
<!-- app:tl_indicator_width="@dimen/dp_28"-->
|
|
||||||
<!-- app:tl_showCateIndicator="false"-->
|
|
||||||
<!-- app:tl_tab_width="@dimen/dp_50"-->
|
|
||||||
<!-- app:tl_textBold="SELECT"-->
|
|
||||||
<!-- app:tl_textSelectColor="@color/color_2B2823"-->
|
|
||||||
<!-- app:tl_textSelectedSize="@dimen/sp_14"-->
|
|
||||||
<!-- app:tl_textUnselectColor="@color/color_FF999999"-->
|
|
||||||
<!-- app:tl_textsize="@dimen/sp_12" />-->
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.ScrollViewPager
|
<com.xscm.moduleutil.widget.ScrollViewPager
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
|
|||||||
@@ -1,90 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context=".dialog.RoomOnlineDialogFragment">
|
tools:context=".dialog.RoomOnlineDialogFragment">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_num"
|
android:id="@+id/tv_num"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:gravity="center"
|
|
||||||
android:layout_margin="@dimen/dp_16"
|
|
||||||
android:layout_marginTop="@dimen/dp_27"
|
android:layout_marginTop="@dimen/dp_27"
|
||||||
tools:text="在线用户(56)"
|
android:gravity="center"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:text="在线用户(0)" />
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:id="@+id/maishang"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="@dimen/dp_21"-->
|
|
||||||
<!-- android:layout_gravity="left"-->
|
|
||||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
|
||||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
|
||||||
<!-- android:textColor="@color/color_FF666666"-->
|
|
||||||
<!-- android:textSize="@dimen/sp_14"-->
|
|
||||||
<!-- android:text="麦上用户" />-->
|
|
||||||
|
|
||||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||||
android:id="@+id/srl"
|
android:id="@+id/srl"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
app:srlEnableLoadMore="true"
|
app:srlEnableLoadMore="true"
|
||||||
app:srlEnableRefresh="true"
|
app:srlEnableRefresh="true">
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
>
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_comment"
|
android:id="@+id/rv_comment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:text="Hello World!"
|
|
||||||
android:paddingEnd="@dimen/dp_16"
|
android:paddingEnd="@dimen/dp_16"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
/>
|
|
||||||
|
|
||||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:id="@+id/maixia"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="@dimen/dp_21"-->
|
|
||||||
<!-- android:layout_gravity="left"-->
|
|
||||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
|
||||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
|
||||||
<!-- android:textColor="@color/color_FF666666"-->
|
|
||||||
<!-- android:textSize="@dimen/sp_14"-->
|
|
||||||
<!-- android:text="麦下用户" />-->
|
|
||||||
|
|
||||||
<!-- <com.scwang.smartrefresh.layout.SmartRefreshLayout-->
|
|
||||||
<!-- android:id="@+id/srl2"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- app:srlEnableLoadMore="true"-->
|
|
||||||
<!-- app:srlEnableRefresh="false"-->
|
|
||||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
|
||||||
<!-- android:id="@+id/rv_comment2"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="Hello World!"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
|
||||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
|
||||||
<!-- />-->
|
|
||||||
|
|
||||||
<!-- </com.scwang.smartrefresh.layout.SmartRefreshLayout>-->
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
android:id="@+id/item"
|
android:id="@+id/item"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_height="@dimen/dp_50"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
android:layout_marginEnd="@dimen/dp_16">
|
android:layout_marginEnd="@dimen/dp_16">
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_12"
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
android:text="用户名"
|
android:text="用户名"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="14sp"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintStart_toEndOf="@+id/like_avatar"
|
app:layout_constraintStart_toEndOf="@+id/like_avatar"
|
||||||
app:layout_constraintTop_toTopOf="@+id/like_avatar" />
|
app:layout_constraintTop_toTopOf="@+id/like_avatar" />
|
||||||
|
|
||||||
@@ -42,7 +42,6 @@
|
|||||||
android:id="@+id/line"
|
android:id="@+id/line"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_12"
|
|
||||||
android:layout_marginBottom="@dimen/dp_4"
|
android:layout_marginBottom="@dimen/dp_4"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_21"
|
android:layout_height="@dimen/dp_21"
|
||||||
android:layout_gravity="left"
|
android:layout_gravity="left"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:textColor="@color/color_FF666666"
|
android:textColor="@color/color_FF666666"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:orientation="vertical"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
@@ -16,14 +16,15 @@
|
|||||||
android:id="@+id/ll_gift_rule"
|
android:id="@+id/ll_gift_rule"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:layout_marginStart="@dimen/dp_2"
|
android:layout_marginStart="@dimen/dp_2"
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
android:layout_marginEnd="@dimen/dp_2"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:background="@mipmap/gift_mh"
|
android:background="@mipmap/gift_mh"
|
||||||
android:layout_above="@+id/cl"
|
android:layout_above="@+id/cl"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone"
|
android:visibility="gone">
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -68,6 +69,8 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl"
|
android:id="@+id/cl"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_room_gift"
|
android:background="@drawable/bg_room_gift"
|
||||||
@@ -89,14 +92,14 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_gift_user"
|
android:id="@+id/rv_gift_user"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toStartOf="@+id/rl_pit_one"
|
android:layout_toStartOf="@+id/rl_pit_one"
|
||||||
tools:listitem="@layout/item_room_gift" />
|
tools:listitem="@layout/item_room_gift" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_pit_one"
|
android:id="@+id/rl_pit_one"
|
||||||
android:layout_width="@dimen/dp_72"
|
android:layout_width="@dimen/dp_72"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginStart="@dimen/dp_5"
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="TAB" />
|
android:text="TAB" />
|
||||||
|
|
||||||
<com.example.moduletablayout.widget.MsgView xmlns:mv="http://schemas.android.com/apk/res-auto"
|
<com.example.moduletablayout.widget.MsgView
|
||||||
|
xmlns:mv="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/rtv_msg_tip"
|
android:id="@+id/rtv_msg_tip"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user