修改BUG
This commit is contained in:
@@ -59,6 +59,7 @@ import com.petterp.floatingx.listener.control.IFxControl;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.HeadlineBean;
|
||||
import com.qxcm.moduleutil.bean.HeadlineEvent;
|
||||
import com.qxcm.moduleutil.bean.RoomSingleton;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RankInfo;
|
||||
@@ -72,6 +73,7 @@ import com.qxcm.moduleutil.event.MusicEvent;
|
||||
import com.qxcm.moduleutil.event.RoomGiftGiveEvent;
|
||||
import com.qxcm.moduleutil.event.RoomInputHideEvent;
|
||||
import com.qxcm.moduleutil.event.RoomOutEvent;
|
||||
import com.qxcm.moduleutil.event.RoomTaskEvent;
|
||||
import com.qxcm.moduleutil.event.RoomWheatEvent;
|
||||
import com.qxcm.moduleutil.event.SurfaceEvent;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
@@ -98,6 +100,7 @@ import com.qxcm.moduleutil.event.RoomJoinMountModel;
|
||||
import com.qxcm.moduleutil.rtc.AgoraManager;
|
||||
import com.qxcm.moduleutil.rtc.MusicPlayBean;
|
||||
import com.qxcm.moduleutil.rtc.RtcCore;
|
||||
import com.qxcm.moduleutil.service.MyRoomSingleton;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.DialogUtils;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
@@ -142,6 +145,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
public String password;
|
||||
@Autowired
|
||||
public String roomId;
|
||||
|
||||
@Autowired
|
||||
public String taskId;
|
||||
|
||||
public static boolean sDestroied = false;
|
||||
LikeUserAdapter<RoomOnlineBean> likeUserAdapter;
|
||||
String[] permissions = {Manifest.permission.RECORD_AUDIO};
|
||||
@@ -200,9 +207,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(SurfaceEvent surfaceView) {
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {//判断是否是电影房
|
||||
floatingMagnetView = findViewById(R.id.flaoat);//电影房
|
||||
if (mRoomInfoResp.getUser_info().getIs_room_owner() != 1) {//判断是不是房主,1:是 如何是,不展示 0不是,展示布局
|
||||
if (surfaceView.getType() != 1) {
|
||||
floatingMagnetView = findViewById(R.id.flaoat);//电影房
|
||||
|
||||
FrameLayout container = floatingMagnetView.findViewById(R.id.fl_screenshare);
|
||||
// mBinding.flaoat.setVisibility(GONE);//展示或不展示
|
||||
if (surfaceView == null) {
|
||||
@@ -220,6 +228,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// mBinding.flScreenshare.addView(surfaceView);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
floatingMagnetView.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,9 +238,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void hideInput(RoomInputHideEvent event) {
|
||||
if (event.hide) {
|
||||
// mBinding.vpRoomPager.setScroll(false);
|
||||
mBinding.vpRoomPager.setScrollContainer(false);
|
||||
} else {
|
||||
// mBinding.vpRoomPager.setScroll(true);
|
||||
mBinding.vpRoomPager.setScrollContainer(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,6 +283,33 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
LogUtils.e("lxj", "开始时间:" + TimeUtils.date2String(new Date()));
|
||||
|
||||
if (taskId != null) {
|
||||
if (taskId.equals("9")) {
|
||||
MyRoomSingleton.getInstance().onEnterRoom(taskId);
|
||||
}
|
||||
}
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onRoomTaskEvent(RoomTaskEvent event) {
|
||||
if (taskId != null && !taskId.equals("9")) {//这是每日任务完成发送私聊信息的事件
|
||||
RetrofitClient.getInstance().dailyTasksComplete(taskId, new BaseObserver<RoomSingleton>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(RoomSingleton roomSingleton) {
|
||||
number++;
|
||||
// 这里处理请求结果
|
||||
if (roomSingleton.getIs_completed() == 1) {
|
||||
// 任务完成,可以做一些后续操作
|
||||
taskId = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,7 +354,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
if (!TextUtils.isEmpty(msg) && msg.contains("当前余额不足")) {
|
||||
com.hjq.toast.ToastUtils.show("当前余额不足,请充值");
|
||||
ThreadUtils.runOnUiThreadDelayed(() -> {
|
||||
RechargeDialogFragment.show(roomId,null, getSupportFragmentManager());
|
||||
RechargeDialogFragment.show(roomId, null, getSupportFragmentManager());
|
||||
// DialogUtils.showDialogFragment(ARouter.getInstance().build(ARouteConstants.RECHARGE_DIALOG).navigation());
|
||||
}, 1400);
|
||||
}
|
||||
@@ -466,27 +503,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
RoomOnlineDialogFragment.show(roomId, "", mRoomUserBean, mRoomInfoResp, getSupportFragmentManager());
|
||||
}
|
||||
});
|
||||
// RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
// t.setText("羽声严禁未成年人进行直播或打赏,官方将24小时在线巡查。我们提倡绿色直播,直播间严禁出现涉政、涉恐、涉黄、涉赌等违法违规内容,严禁宣传封建迷信、宗教极端思想、出现低俗色情、吸烟酗酒等内容,严禁违反社会主义核心价值观、践踏社会道德底线、诱导打赏、低俗 PK 、买卖金币等行为,请大家共同遵守、监督并及时举报。请勿相信各类刷钻、购买礼包、游戏币及电商贩卖等非官方广告信息,谨防网络诈骗。");
|
||||
// onMessageReceived(new RoomMessageEvent(1000, roomId, t));
|
||||
//// onChatRoomViewCreation();
|
||||
// V2TIMManager.getInstance().joinGroup("room" + roomId, "申请加入", new V2TIMCallback() {
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
//// RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
//// t.setText("羽声严禁未成年人进行直播或打赏,官方将24小时在线巡查。我们提倡绿色直播,直播间严禁出现涉政、涉恐、涉黄、涉赌等违法违规内容,严禁宣传封建迷信、宗教极端思想、出现低俗色情、吸烟酗酒等内容,严禁违反社会主义核心价值观、践踏社会道德底线、诱导打赏、低俗 PK 、买卖金币等行为,请大家共同遵守、监督并及时举报。请勿相信各类刷钻、购买礼包、游戏币及电商贩卖等非官方广告信息,谨防网络诈骗。");
|
||||
//// // 加入群组成功
|
||||
//// notifyMessageReceived(new RoomMessageEvent(1000, mRoomId, t));
|
||||
// Log.d("lxj", "加入群组成功:" );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// // 加入群组失败
|
||||
// Log.d("lxj", "加入群组失败:" + code + "=" + desc);
|
||||
// }
|
||||
// });
|
||||
// MessageListenerSingleton.getInstance().addOnMessageReceivedListener(this);
|
||||
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
SpUtil.saveMyRoomId(roomId);
|
||||
@@ -586,7 +602,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// EventBus.getDefault().post(new RoomClearCardiacRunnable(messageEvent.getRoomId()));
|
||||
} else if (messageEvent.getMsgType() == 1036) {
|
||||
if (messageEvent.getText().getRoom_id().equals(roomId)) {
|
||||
mBinding.roomTop.tvNum.setText(messageEvent.getText().getOnline_number() + "");
|
||||
if (!mBinding.roomTop.tvNum.getText().toString().equals(messageEvent.getText().getOnline_number() + "")) {
|
||||
mBinding.roomTop.tvNum.setText(messageEvent.getText().getOnline_number() + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -636,6 +654,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// mBinding.flaoat.setVisibility(is? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
public void setOnlineNumber(int number) {
|
||||
mBinding.roomTop.tvNum.setText(number + "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 特效设置
|
||||
*/
|
||||
@@ -741,7 +763,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
this.mRoomOwnerBean = resp.getRoom_owner();
|
||||
this.mPitList = mRoomBean.getPit_list();
|
||||
|
||||
if (roomBean.getType_id().equals("6")){
|
||||
if (roomBean.getType_id().equals("6")) {
|
||||
// mBinding.ivBg.setImageDrawable(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.cabin_bj));
|
||||
}
|
||||
|
||||
@@ -759,20 +781,18 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
number = roomBean.getOnline_number();
|
||||
mBinding.roomTop.tvNum.setText(number + "");
|
||||
|
||||
// StringBuilder userIds = new StringBuilder();
|
||||
// for (int i = 0; i < mRoomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
// String userId = mRoomInfoResp.getRoom_info().getPit_list().get(i).getUser_id();
|
||||
// if (userId != null && !userId.equals("0") && !userId.isEmpty()) {
|
||||
// if (userIds.length() > 0) {
|
||||
// userIds.append(",");
|
||||
// }
|
||||
// userIds.append(userId);
|
||||
// }
|
||||
// }
|
||||
StringBuilder userIds = new StringBuilder();
|
||||
for (int i = 0; i < mRoomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
String userId = mRoomInfoResp.getRoom_info().getPit_list().get(i).getUser_id();
|
||||
if (userId != null && !userId.equals("0") && !userId.isEmpty()) {
|
||||
if (userIds.length() > 0) {
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(userId);
|
||||
}
|
||||
}
|
||||
//
|
||||
// if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
// }
|
||||
|
||||
|
||||
if (!isFinishing() && !isDestroyed()) {
|
||||
|
||||
@@ -802,9 +822,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
} else {
|
||||
mBinding.roomTop.btnFollow.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.collect));
|
||||
}
|
||||
if ((roomBean.getType_id().equals("3") || roomBean.getType_id().equals("1") || roomBean.getType_id().equals("4"))&& roomBean.getLabel_id().equals("2")){
|
||||
if ((roomBean.getType_id().equals("3") || roomBean.getType_id().equals("1") || roomBean.getType_id().equals("4")) && roomBean.getLabel_id().equals("2")) {
|
||||
AgoraManager.getInstance(this).setBjMusic(false);
|
||||
}else {
|
||||
} else {
|
||||
AgoraManager.getInstance(this).setBjMusic(true);
|
||||
}
|
||||
|
||||
@@ -827,6 +847,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// } else {
|
||||
// mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
}
|
||||
}
|
||||
|
||||
private static final long CLICK_DELAY = 500; // 延迟时间,单位毫秒
|
||||
@@ -834,6 +858,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private boolean isIntercepted = false;
|
||||
private long downTime;
|
||||
|
||||
///头条
|
||||
public void toutiao() {
|
||||
if (mRoomInfoResp.getRoom_info().getHead_line() != null) {
|
||||
mBinding.flaoatZuoji.setVisibility(VISIBLE);
|
||||
@@ -1168,9 +1193,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
} else {
|
||||
mBinding.roomTop.btnFollow.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.collect));
|
||||
}
|
||||
if ((roomBean.getType_id().equals("3") || roomBean.getType_id().equals("1") || roomBean.getType_id().equals("4"))&& roomBean.getLabel_id().equals("2")){
|
||||
if ((roomBean.getType_id().equals("3") || roomBean.getType_id().equals("1") || roomBean.getType_id().equals("4")) && roomBean.getLabel_id().equals("2")) {
|
||||
AgoraManager.getInstance(this).setBjMusic(false);
|
||||
}else {
|
||||
} else {
|
||||
AgoraManager.getInstance(this).setBjMusic(true);
|
||||
}
|
||||
AgoraManager.getInstance(this).stopMuisc();
|
||||
@@ -1200,7 +1225,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
AgoraManager.getInstance(this).stopScreenCapture();
|
||||
AgoraManager.getInstance(this).leaveRoom();
|
||||
AgoraManager.getInstance(this).destroy();
|
||||
|
||||
MyRoomSingleton.getInstance().onExitRoom();
|
||||
V2TIMManager.getInstance().quitGroup("room" + roomId, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
@@ -1238,7 +1263,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
SpUtil.setUserOnline(GsonUtils.toJson(list));
|
||||
// SpUtil.setUserOnline(GsonUtils.toJson(list));
|
||||
if(!list.isEmpty()){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
UserOnlineStatusBean userOnlineStatusBean = list.get(i);
|
||||
EventBus.getDefault().post(userOnlineStatusBean);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,11 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(data.get(i).getPit_number());
|
||||
if (data!=null && data.get(i)!=null && data.get(i).getPit_number()!=null) {
|
||||
sb.append(data.get(i).getPit_number());
|
||||
}else {
|
||||
sb.append("");
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
@@ -67,7 +67,7 @@ public class RankingCharmListAdapter extends BaseQuickAdapter<CharmRankingResp,
|
||||
helper.addOnClickListener(R.id.room_item_head);
|
||||
LinearLayout ll = helper.getView(R.id.bnv_rank_list_rich);
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
ll.removeAllViews();
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
|
||||
@@ -5,8 +5,11 @@ import android.app.Activity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.RoomTime;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RoomAuctionContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void applyPit();
|
||||
@@ -16,6 +19,8 @@ public class RoomAuctionContacts {
|
||||
void auctionDelay();
|
||||
void auctionEnd();
|
||||
void auctionMode();
|
||||
void userOnlineStatus(List<UserOnlineStatusBean> list);
|
||||
|
||||
}
|
||||
|
||||
public interface IRoomDataListPre extends IPresenter {
|
||||
@@ -27,6 +32,7 @@ public class RoomAuctionContacts {
|
||||
void auctionEnd(String auctionId,String roomId);
|
||||
|
||||
void auctionMode(String roomId,String labelId);
|
||||
void userOnlineStatus(String userId, String roomid);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,5 +35,6 @@ public class SingSongContacts {
|
||||
|
||||
void endPk(String pk_id,String type,String user_id);
|
||||
void userOnlineStatus(String userId, String roomid);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -119,6 +122,21 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
Dialog dialog = getDialog();
|
||||
if (dialog != null) {
|
||||
// 获取屏幕高度
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels;
|
||||
|
||||
// 设置DialogFragment的高度为屏幕高度的70%
|
||||
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, (int) (height * 0.6));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
// MvpPre.getRewardList("1", 1, 10);
|
||||
@@ -367,10 +385,12 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
if (currentItem < 1) { //比2小是才是礼物
|
||||
GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
roonGiftModel = fragment.getGiftList();
|
||||
// roonGiftModel = fragment.getGiftList();
|
||||
giftModel = fragment.mGiftList();
|
||||
} else {
|
||||
GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
giftModel = fragment.mGiftList();
|
||||
// giftModel = fragment.mGiftList();
|
||||
roonGiftModel = fragment.getGiftList();
|
||||
}
|
||||
return currentItem;
|
||||
}
|
||||
@@ -425,11 +445,15 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
giftNumber = num;
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel);
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getPit_number() != null && userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty() || jingp!=1) {
|
||||
if (userInfo.getPit_number() != null) {
|
||||
if (userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty() || jingp != 1) {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
} else {
|
||||
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "1");
|
||||
}
|
||||
}else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
} else {
|
||||
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "1");
|
||||
}
|
||||
} else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
@@ -484,6 +508,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
giftLabelBean.setName("背包");
|
||||
giftLabelBeans.add(0, giftLabelBean);
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList));
|
||||
mBinding.viewPager.setOffscreenPageLimit(0);
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.view.WindowManager;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.activity.RoomActivity;
|
||||
import com.example.moduleroom.adapter.RoomOnlineAdapter;
|
||||
import com.example.moduleroom.contacts.RoomContacts;
|
||||
import com.example.moduleroom.databinding.FragmentRoomOnlineDialogBinding;
|
||||
@@ -257,6 +258,9 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
int total = onlineBean.getOn_pit().size() + onlineBean.getOff_pit().size();
|
||||
|
||||
mBinding.tvNum.setText("在线用户(" + total + ")人");
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setOnlineNumber(total);
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
||||
@@ -99,7 +99,9 @@ public class RoomPkDialogFragment extends BaseMvpDialogFragment<RoomPkPresenter,
|
||||
public void run() {
|
||||
keyWord = editable.toString();
|
||||
if (!StringUtils.isEmpty(keyWord)) {
|
||||
MvpPre.searchPkRoom(keyWord, "1", "15");
|
||||
if (MvpPre!=null) {
|
||||
MvpPre.searchPkRoom(keyWord, "1", "15");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, DELAY);
|
||||
|
||||
@@ -150,12 +150,12 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
dataList.add(new RoomSettingBean("更多操作", null, null, null, -1, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("离开房间", "ic_leave", null, null, RoomSettingBean.QXRoomSettingTypeRoomLeave, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("房间设置", "ic_room_setting", null, null, RoomSettingBean.QXRoomSettingTypeRoomSetting, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("房间欢迎语", "ic_welcome", null, null, RoomSettingBean.QXRoomSettingTypeRoomWelcome,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("关闭特效", "ic_close_effects", null, null, RoomSettingBean.QXRoomSettingTypeRoomCloseEffects, read, isSelected, false,effectOn));
|
||||
dataList.add(new RoomSettingBean("意见反馈", "ic_report", null, null, RoomSettingBean.QXRoomSettingTypeRoomReport, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("举报", "ic_report", null, null, RoomSettingBean.QXRoomSettingTypeRoomReport, read, isSelected, false, false));
|
||||
List<RoomSettingBean> filteredList = new ArrayList<>();
|
||||
// 更新 itemType
|
||||
for (RoomSettingBean bean : dataList) {
|
||||
@@ -255,6 +255,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
MvpPre.changeRoomType(roomId, "4");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
}else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport){
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", "https://vespa.qxmier.com/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -127,7 +127,9 @@ public class WheatFeedingDialogFragment extends BaseMvpDialogFragment<WheatPrese
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
EventBus.getDefault().register(this);
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
Window window = getDialog().getWindow();
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
@@ -159,7 +161,9 @@ public class WheatFeedingDialogFragment extends BaseMvpDialogFragment<WheatPrese
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.example.moduleroom.databinding.RoomFragementTransEaseChatBinding;
|
||||
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUserBean;
|
||||
import com.qxcm.moduleutil.event.RoomTaskEvent;
|
||||
import com.qxcm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.example.moduleroom.presenter.PublicScreenEaseChatPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
@@ -64,6 +65,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
private RoomInfoResp roomInfoResp;
|
||||
private EaseChatAdapter easeChatAdapter;
|
||||
private CountDownTimer countDownTimer;
|
||||
private int number;
|
||||
// private List<LuckyRankBean> oldList = new ArrayList<>();
|
||||
private static final int queueMessageNum = 20;//浇水礼物推送队列最大数
|
||||
// private RoomWinningRecordDialogFragment recordDialogFragment;
|
||||
@@ -467,6 +469,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
@Override
|
||||
public void onSuccess(V2TIMMessage message) {
|
||||
// 发送群聊自定义消息成功
|
||||
EventBus.getDefault().post(new RoomTaskEvent());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -551,7 +554,20 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
} else if (message.getMsgType() == 1036 || message.getMsgType()==1037) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
} else if (message.getMsgType() == 1 || message.getMsgType() == 1005) {
|
||||
}else if (message.getMsgType() == 1005){
|
||||
EventBus.getDefault().post(message);
|
||||
if (message.getText().getText()==null){
|
||||
return;
|
||||
}else {
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}
|
||||
}else if (message.getMsgType()==1035){
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}
|
||||
else if (message.getMsgType() == 1 ) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
@@ -561,6 +577,10 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}else if (message.getMsgType() == 1038){
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
// easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
|
||||
@@ -228,7 +228,11 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
|
||||
@Override
|
||||
public void setWealthEmpty(List<CharmRankingResp> list) {
|
||||
wAdapter.setEmptyView(commonEmptyView);
|
||||
if (list != null){
|
||||
wAdapter.setNewData(list);
|
||||
}else {
|
||||
wAdapter.setEmptyView(commonEmptyView);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -205,17 +205,21 @@ public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
|
||||
@Override
|
||||
public void relationCard(RelationCardBean list) {
|
||||
if (type == 1) {
|
||||
for (int i = 0; i < list.getQinmi().size(); i++) {
|
||||
list.getQinmi().get(i).setType(1);
|
||||
}
|
||||
adapter.setNewData(list.getQinmi());
|
||||
} else if (type == 2) {
|
||||
if (list != null && list.getZhenai() != null) {
|
||||
for (int i = 0; i < list.getZhenai().size(); i++) {
|
||||
list.getZhenai().get(i).setType(2);
|
||||
if (list !=null) {
|
||||
if (type == 1) {
|
||||
if (list != null && list.getQinmi() != null) {
|
||||
for (int i = 0; i < list.getQinmi().size(); i++) {
|
||||
list.getQinmi().get(i).setType(1);
|
||||
}
|
||||
adapter.setNewData(list.getQinmi());
|
||||
}
|
||||
} else if (type == 2) {
|
||||
if (list != null && list.getZhenai() != null) {
|
||||
for (int i = 0; i < list.getZhenai().size(); i++) {
|
||||
list.getZhenai().get(i).setType(2);
|
||||
}
|
||||
adapter.setNewData(list.getZhenai());
|
||||
}
|
||||
adapter.setNewData(list.getZhenai());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.RoomTime;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
@@ -115,9 +116,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
|
||||
public void initOverlayButtons() {
|
||||
if (isButtonsInflated) return;
|
||||
// if (isButtonsInflated) return;
|
||||
|
||||
ViewStub stub = requireActivity().findViewById(R.id.stub_buttons);
|
||||
stub = requireActivity().findViewById(R.id.stub_buttons);
|
||||
if (stub != null) {
|
||||
View inflated = stub.inflate();
|
||||
|
||||
@@ -129,7 +130,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
imActionJs.setOnClickListener(this::onChock);
|
||||
imActionYs.setOnClickListener(this::onChock);
|
||||
|
||||
isButtonsInflated = true;
|
||||
// isButtonsInflated = true;
|
||||
} else {
|
||||
// 报错提示:说明 top_overlay_buttons.xml 中没有定义这些 id
|
||||
throw new IllegalStateException("im_action_js or im_action_ys not found in overlay layout");
|
||||
@@ -139,6 +140,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
initOverlayButtons();
|
||||
LogUtils.e("lxj", "展示room时间:" + TimeUtils.date2String(new Date()));
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
@@ -147,6 +149,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
if (roomPitBean.getUser_id() != null && !roomPitBean.getUser_id().isEmpty() && !roomPitBean.getUser_id().equals("0")) {
|
||||
roomPitBean.setIs_pm(1);
|
||||
wheatView.setData(roomPitBean);
|
||||
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
}
|
||||
parentFragment = (RoomFragment) getParentFragment();
|
||||
@@ -207,7 +210,17 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
auctionId = "";
|
||||
SpUtil.setAuctionId("");
|
||||
}
|
||||
|
||||
tzblChanged();
|
||||
RoomPitBean roomPitBean2 = wheatView.pitBean;
|
||||
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")){
|
||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
imActionYs.setVisibility(VISIBLE);
|
||||
} else {
|
||||
imActionJs.setVisibility(INVISIBLE);
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getvjs() {
|
||||
@@ -218,6 +231,31 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
protected void tzblChanged() {
|
||||
|
||||
StringBuilder userIds = new StringBuilder();
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
String userId = roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id();
|
||||
if (userId != null && !userId.equals("0") && !userId.isEmpty()) {
|
||||
if (userIds.length() > 0) {
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(userId);
|
||||
}
|
||||
}
|
||||
|
||||
if (auctionUserBean!=null && auctionUserBean.getUser_id()!=null && !auctionUserBean.getUser_id().equals("0")){
|
||||
if (userIds.length() > 0){
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(auctionUserBean.getUser_id());
|
||||
}
|
||||
|
||||
if (userIds.length() > 0 && roomInfoResp.getRoom_info().getRoom_id() != null) {
|
||||
MvpPre.userOnlineStatus(userIds.toString(), roomInfoResp.getRoom_info().getRoom_id());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
wheatView = mBinding.roomMakeWheat;
|
||||
@@ -519,9 +557,25 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
// RoomMakeWheatView wheatView = mBinding.roomMakeWheat;
|
||||
RoomPitBean pitBean= wheatView.pitBean;
|
||||
RoomPitBean pitBean2= wheatView2.pitBean;
|
||||
|
||||
for (UserOnlineStatusBean bean : list) {
|
||||
if (pitBean!=null && pitBean.getUser_id() != null && bean.getUser_id().equals(pitBean.getUser_id())) {
|
||||
wheatView.setOnlineStatus(bean);
|
||||
}
|
||||
if (pitBean2!=null && pitBean2.getUser_id() != null && bean.getUser_id().equals(pitBean2.getUser_id())) {
|
||||
wheatView2.setOnlineStatus(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
|
||||
boolean b = false;
|
||||
if (messageEvent.getMsgType() == 1003) {//上麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean(messageEvent));
|
||||
@@ -546,9 +600,36 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
wheatView.setData(getPitBean2(messageEvent, "9"));
|
||||
getvjs();
|
||||
imActionYs.setVisibility(GONE);
|
||||
|
||||
// RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(Integer.parseInt(messageEvent.getText().getPit_number()) - 1);
|
||||
// pitBean.setUser_id("");
|
||||
// pitBean.setAvatar("");
|
||||
// pitBean.setNickname("");
|
||||
// pitBean.setSex("");
|
||||
// pitBean.setCharm("");
|
||||
// roomInfoResp.getRoom_info().getPit_list().set(Integer.parseInt(messageEvent.getText().getPit_number()) - 1, pitBean);
|
||||
// if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
//
|
||||
// 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(messageEvent.getText().getPit_number()), false, b);
|
||||
// }
|
||||
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
RoomPitBean pitBean = wheatView.pitBean;
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(messageEvent.getText().getPit_number()), false, true);
|
||||
// parentFragment.setRoleType(0, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
}
|
||||
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
@@ -590,7 +671,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
wheatView2.setData(getPitBean2(messageEvent, "888"));
|
||||
if (parentFragment != null) {
|
||||
if(messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
@@ -635,6 +716,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
auctionList = null;
|
||||
gexList();
|
||||
steView(type);
|
||||
isButtonsInflated = false;
|
||||
} else if (messageEvent.getMsgType() == 1012) {
|
||||
stub.setVisibility(GONE);
|
||||
} else if (messageEvent.getMsgType() == 1026) {//主持延迟
|
||||
countDownTime(messageEvent.getText().getDuration());
|
||||
} else if (messageEvent.getMsgType() == 1027) {
|
||||
@@ -661,6 +745,36 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1035) {
|
||||
RoomPitBean pitBean = mBinding.roomMakeWheat.pitBean;
|
||||
if (pitBean.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mBinding.roomMakeWheat.setData(pitBean);
|
||||
}
|
||||
RoomPitBean pitBean2 = mBinding.roomMakeWheat2.pitBean;
|
||||
if (pitBean2.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
pitBean2.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean2.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean2.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean2.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mBinding.roomMakeWheat2.setData(pitBean2);
|
||||
}
|
||||
|
||||
if (auctionList != null && auctionList.size() > 0) {
|
||||
for (int i = 0; i < auctionList.size(); i++) {
|
||||
if (auctionList.get(i).getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
auctionList.get(i).setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
auctionList.get(i).setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
auctionList.get(i).setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
auctionList.get(i).setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
gexList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -677,6 +791,14 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
isButtonsInflated = false;
|
||||
releaseCountDownTimer();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
private void yinc() {
|
||||
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||
getvjs();
|
||||
@@ -709,7 +831,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
pitBean.setNickname(auctionListBean.getNickname());
|
||||
pitBean.setAvatar(auctionListBean.getAvatar());
|
||||
pitBean.setCharm(auctionListBean.getCharm());
|
||||
|
||||
pitBean.setSex(auctionListBean.getSex());
|
||||
pitBean.setDress(auctionListBean.getDress());
|
||||
if (j == 1) {
|
||||
pitBean.setPit_number("111");
|
||||
RoomMakeWheatView wheatView = mBinding.ivAuction1;
|
||||
@@ -968,7 +1091,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
* @param defaultSize 默认字体大小(sp)
|
||||
* @param selectedSize 点击后选中字体大小(sp)
|
||||
*/
|
||||
public void toggleTextStyles(TextView qinmi, TextView zhenai, int defaultColor, int selectedColor, int clickedColor, float defaultSize, float selectedSize, int type) {
|
||||
public void toggleTextStyles(TextView qinmi, TextView zhenai, int defaultColor,
|
||||
int selectedColor, int clickedColor, float defaultSize, float selectedSize, int type) {
|
||||
if (type == 1) {
|
||||
// 切换到真爱拍样式
|
||||
qinmi.setTextColor(selectedColor);
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -8,12 +13,24 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
@@ -32,6 +49,7 @@ import com.example.moduleroom.presenter.RoomPresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.RoomInputEvent;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
@@ -47,6 +65,7 @@ import com.qxcm.moduleutil.event.UnreadCountEvent;
|
||||
import com.qxcm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.qxcm.moduleutil.rtc.AgoraManager;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.RoomMessageInputMenu;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||
|
||||
@@ -404,9 +423,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (mRoomInfoResp.getUser_info().getIs_mute().equals("1")) {
|
||||
ToastUtils.show("您已经被禁言");
|
||||
} else {
|
||||
mBinding.llInput.setVisibility(View.VISIBLE);
|
||||
mBinding.inputMenu1.bringToFront(); // 强制将该 View 置于最上层
|
||||
mBinding.inputMenu1.show();
|
||||
|
||||
// mBinding.llInput.setVisibility(View.VISIBLE);
|
||||
// mBinding.inputMenu1.bringToFront(); // 强制将该 View 置于最上层
|
||||
// mBinding.inputMenu1.show();
|
||||
dialogDismiss();
|
||||
|
||||
}
|
||||
} else if (id == R.id.ll_input) {
|
||||
mBinding.llInput.setVisibility(View.GONE);
|
||||
@@ -418,7 +440,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, 1, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.rl_gift) {//礼物
|
||||
RoomGiftDialogFragment.show(mRoomInfoResp, null, roomId, 0,getChildFragmentManager());
|
||||
RoomGiftDialogFragment.show(mRoomInfoResp, null, roomId, 0, getChildFragmentManager());
|
||||
} else if (id == R.id.iv_sound_effects) {
|
||||
SoundEffectsDialogFragment.show(roomId, getChildFragmentManager());
|
||||
} else if (id == R.id.cl_first_charge) {
|
||||
@@ -474,6 +496,147 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canSend = true;
|
||||
private CountDownTimer mCountDownTimer;
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
public void dialogDismiss() {
|
||||
|
||||
|
||||
// 使用自定义的 Dialog
|
||||
// final Dialog dialog = new Dialog(getContext(), android.R.style.Theme_Translucent_NoTitleBar);
|
||||
// dialog.setContentView(com.qxcm.moduleutil.R.layout.dialog_custom_input);
|
||||
//
|
||||
// // 设置对话框在底部显示
|
||||
// Window window = dialog.getWindow();
|
||||
// if (window != null) {
|
||||
// window.setGravity(Gravity.BOTTOM);
|
||||
// window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
// window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
// }
|
||||
//
|
||||
// EditText etContent = dialog.findViewById(com.qxcm.moduleutil.R.id.et_content);
|
||||
// Button tvSend = dialog.findViewById(com.qxcm.moduleutil.R.id.tv_send);
|
||||
//
|
||||
// // 确保 tvSend 不为空并且正确绑定点击事件
|
||||
// if (tvSend != null) {
|
||||
// tvSend.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// Log.d("RoomFragment", "tvSend clicked"); // 添加日志进行调试
|
||||
//
|
||||
// if (!canSend) {
|
||||
// ToastUtils.show("消息发送较频繁~");
|
||||
// return;
|
||||
// }
|
||||
// String text = etContent.getText().toString();
|
||||
// if (TextUtils.isEmpty(text)) {
|
||||
// ToastUtils.show("请输入评论内容");
|
||||
// return;
|
||||
// }
|
||||
// EventBus.getDefault().post(new RoomInputEvent(text));
|
||||
//
|
||||
// etContent.setText("");
|
||||
// countDownTimer();
|
||||
//
|
||||
// // 关闭对话框
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// Log.e("RoomFragment", "tvSend is null"); // 添加日志进行调试
|
||||
// }
|
||||
//
|
||||
// // 显示对话框后自动请求焦点并显示键盘
|
||||
// dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
// @Override
|
||||
// public void onShow(DialogInterface dialogInterface) {
|
||||
// etContent.requestFocus();
|
||||
// InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
// imm.showSoftInput(etContent, InputMethodManager.SHOW_IMPLICIT);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // 显示对话框
|
||||
// dialog.show();
|
||||
|
||||
|
||||
|
||||
// // 使用 AlertDialog.Builder
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
View dialogView = inflater.inflate(com.qxcm.moduleutil.R.layout.room_message_input_menu, null);
|
||||
builder.setView(dialogView);
|
||||
EditText etContent = dialogView.findViewById(com.qxcm.moduleutil.R.id.et_content);
|
||||
Button tvSend = dialogView.findViewById(com.qxcm.moduleutil.R.id.tv_send);
|
||||
// 创建 AlertDialog
|
||||
final AlertDialog dialog = builder.create();
|
||||
// 设置对话框在底部显示
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
}
|
||||
// dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
// 设置对话框在底部显示
|
||||
// dialog.getWindow().setGravity(Gravity.BOTTOM);
|
||||
// 自动弹出键盘
|
||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
tvSend.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!canSend) {
|
||||
ToastUtils.show("消息发送较频繁~");
|
||||
return;
|
||||
}
|
||||
String text = etContent.getText().toString();
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
ToastUtils.show("请输入评论内容");
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(new RoomInputEvent(text));
|
||||
etContent.setText("");
|
||||
countDownTimer();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
etContent.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(etContent, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
private void countDownTimer() {
|
||||
releaseCountDownTimer();
|
||||
mCountDownTimer = new CountDownTimer(3 * 1000L, 1000L) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
canSend = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
canSend = true;
|
||||
}
|
||||
};
|
||||
mCountDownTimer.start();
|
||||
}
|
||||
|
||||
private void releaseCountDownTimer() {
|
||||
if (mCountDownTimer != null) {
|
||||
mCountDownTimer.cancel();
|
||||
mCountDownTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomWheatEvent messageEvent) {
|
||||
if (messageEvent.getRoomId().equals(roomId)) {
|
||||
@@ -630,12 +793,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
}
|
||||
|
||||
private boolean haveMe = false;
|
||||
private boolean haveMe = false;
|
||||
|
||||
public void getVoiceStatus(RoomAuction.AuctionUserBean auctionUserBean,List<RoomAuction.AuctionListBean> auctionListBeans,String user_id) {
|
||||
if(auctionListBeans!=null){
|
||||
public void getVoiceStatus(RoomAuction.AuctionUserBean auctionUserBean, List<RoomAuction.AuctionListBean> auctionListBeans, String user_id) {
|
||||
if (auctionListBeans != null) {
|
||||
for (int i = 0; i < auctionListBeans.size(); i++) {
|
||||
if (i<3) {
|
||||
if (i < 3) {
|
||||
if (auctionListBeans.get(i).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
haveMe = true;
|
||||
break;
|
||||
@@ -643,8 +806,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
}
|
||||
if(auctionUserBean!=null){
|
||||
if (auctionUserBean.getUser_id().equals(SpUtil.getUserId() + "")){//判断我是不是被拍卖者
|
||||
if (auctionUserBean != null) {
|
||||
if (auctionUserBean.getUser_id().equals(SpUtil.getUserId() + "")) {//判断我是不是被拍卖者
|
||||
haveMe = true;
|
||||
}
|
||||
}
|
||||
@@ -652,22 +815,22 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
haveMe = true;
|
||||
}
|
||||
|
||||
if (!haveMe){
|
||||
if (!haveMe) {
|
||||
AgoraManager.getInstance(getContext()).ClientRole(false);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, SpUtil.getUserId() + "");
|
||||
// switchMic(2);
|
||||
|
||||
}else {
|
||||
} else {
|
||||
mBinding.rlMic.setVisibility(View.VISIBLE);
|
||||
if (AgoraManager.getInstance(getContext()).isLocalAudioEnabled()){
|
||||
if (AgoraManager.getInstance(getContext()).isLocalAudioEnabled()) {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
}else {
|
||||
} else {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (!user_id.equals(SpUtil.getUserId() + "")) {
|
||||
AgoraManager.getInstance(getContext()).ClientRole(false);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
@@ -675,7 +838,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
haveMe=false;
|
||||
haveMe = false;
|
||||
|
||||
|
||||
}
|
||||
@@ -735,15 +898,23 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||
rl_misc.setVisibility(View.GONE);
|
||||
rl_more.setVisibility(View.GONE);
|
||||
} else if (roleType != 5 ) {
|
||||
} else if (roleType != 5) {
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
if (mRoomInfoResp.getUser_info().getPit_number()==9) {
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
rl_more.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
if ((mRoomInfoResp.getRoom_info().getType_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("4") || mRoomInfoResp.getRoom_info().getType_id().equals("3")) && mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
rl_more.setVisibility(View.GONE);
|
||||
}
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() > 0) {
|
||||
rl_mic.setVisibility(View.VISIBLE);
|
||||
switchMic(2);
|
||||
} else {
|
||||
switchMic(2);
|
||||
rl_mic.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// if (roleType == 5 ){
|
||||
// rl_misc.setVisibility(View.GONE);
|
||||
// rl_more.setVisibility(View.GONE);
|
||||
@@ -755,7 +926,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// }
|
||||
// }
|
||||
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")){
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
rl_voive.setVisibility(View.GONE);//声音
|
||||
rl_more.setVisibility(View.GONE);//PK
|
||||
rl_misc.setVisibility(View.GONE); //音乐
|
||||
@@ -826,6 +997,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
aBoolean = false;
|
||||
mRoomInfoResp.getUser_info().setPit_number(messageEvent.getText().getPit_number() != null ? Integer.parseInt(messageEvent.getText().getPit_number()) : 0);
|
||||
setRoleType(3, Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
switchMic(2);
|
||||
}
|
||||
@@ -833,7 +1005,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
aBoolean = true;
|
||||
|
||||
mRoomInfoResp.getUser_info().setPit_number(0);
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
}
|
||||
@@ -870,7 +1042,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
mRoomInfoResp.getUser_info().setIs_host(1);
|
||||
} else if (messageEvent.getMsgType() == 1018) {
|
||||
mRoomInfoResp.getUser_info().setIs_host(0);
|
||||
}else if (messageEvent.getMsgType() == 1024){
|
||||
} else if (messageEvent.getMsgType() == 1024) {
|
||||
mRoomInfoResp.getRoom_auction().getAuction_list().clear();
|
||||
mRoomInfoResp.getRoom_auction().getAuction_list().addAll(messageEvent.getText().getAuction_list());
|
||||
}
|
||||
|
||||
@@ -199,20 +199,47 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
}
|
||||
}
|
||||
|
||||
if (roomInfoResp.getSong_pit_list() != null && roomInfoResp.getSong_pit_list().size() > 0){
|
||||
for (RoomPitBean roomPitBean : roomInfoResp.getSong_pit_list()){
|
||||
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
if (roomInfoResp.getSong_pit_list() != null && roomInfoResp.getSong_pit_list().size() > 0) {
|
||||
for (RoomPitBean roomPitBean : roomInfoResp.getSong_pit_list()) {
|
||||
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(3, Integer.parseInt(roomPitBean.getPit_number()!=null?roomPitBean.getPit_number():"99"));
|
||||
parentFragment.setRoleType(3, Integer.parseInt(roomPitBean.getPit_number() != null ? roomPitBean.getPit_number() : "99"));
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sv();
|
||||
|
||||
tzblChanged();
|
||||
}
|
||||
|
||||
protected void tzblChanged() {
|
||||
|
||||
StringBuilder userIds = new StringBuilder();
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
String userId = roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id();
|
||||
if (userId != null && !userId.equals("0") && !userId.isEmpty()) {
|
||||
if (userIds.length() > 0) {
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(userId);
|
||||
}
|
||||
}
|
||||
|
||||
RoomPitBean roomPitBean =mBinding.muYc.pitBean;
|
||||
if (roomPitBean != null && roomPitBean.getUser_id() != null && !roomPitBean.getUser_id().equals("0") && !roomPitBean.getUser_id().isEmpty()){
|
||||
if (userIds.length() > 0){
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(roomPitBean.getUser_id());
|
||||
}
|
||||
|
||||
if (userIds.length() > 0 && roomInfoResp.getRoom_info().getRoom_id() != null) {
|
||||
MvpPre.userOnlineStatus(userIds.toString(), roomInfoResp.getRoom_info().getRoom_id());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sv() {
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muZc;
|
||||
if (roomInfoResp.getSong_user_info() != null) {
|
||||
@@ -220,10 +247,9 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
setVisibilityView(1);
|
||||
} else if (roomInfoResp.getSong_user_info().getIs_hot() == 1) {
|
||||
setVisibilityView(1);
|
||||
}else if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "") && roomDefaultWheatView.getUserId().equals(SpUtil.getUserId() + "")){
|
||||
} else if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "") && roomDefaultWheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
setVisibilityView(4);
|
||||
}
|
||||
else if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
} else if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
setVisibilityView(2);
|
||||
} else {
|
||||
setVisibilityView(3);
|
||||
@@ -237,9 +263,9 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
}
|
||||
|
||||
if (roomDefaultWheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
if (mBinding.muYc.getUserId().equals(SpUtil.getUserId() + "")){
|
||||
if (mBinding.muYc.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
setVisibilityView(4);
|
||||
}else {
|
||||
} else {
|
||||
setVisibilityView(1);
|
||||
}
|
||||
}
|
||||
@@ -281,7 +307,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
RoomDefaultWheatView roomDefaultWheatView = (RoomDefaultWheatView) v;
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), roomDefaultWheatView.getUserId(), roomDefaultWheatView.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), roomDefaultWheatView.getUserId(), roomDefaultWheatView.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -298,7 +324,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!muYc.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -308,7 +334,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!muZc.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muZc.getUserId(), muZc.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muZc.getUserId(), muZc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomInfoResp.getRoom_info().getRoom_id(), "9");
|
||||
}
|
||||
@@ -319,20 +345,22 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!muJb.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muJb.getUserId(), muJb.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muJb.getUserId(), muJb.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||
} else {
|
||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), "10", roomInfoResp.getUser_info(),roomInfoResp, getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), "10", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private int isNumberWhether() {
|
||||
if (roomInfoResp.getUser_info().getPit_number()==9){
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 这是判断当前用户是否是麦上房主、管理员、主持,不在主持麦的都是不同用户
|
||||
*
|
||||
@@ -344,16 +372,16 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
return 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1){
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
}else {
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1){
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
@@ -382,7 +410,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
mBinding.llJs.setVisibility(View.GONE);
|
||||
mBinding.llQg.setVisibility(View.GONE);
|
||||
mBinding.llSz.setVisibility(View.GONE);
|
||||
}else if (type == 4){
|
||||
} else if (type == 4) {
|
||||
mBinding.llBz.setVisibility(View.VISIBLE);
|
||||
mBinding.llDs.setVisibility(View.GONE);
|
||||
mBinding.llJs.setVisibility(View.VISIBLE);
|
||||
@@ -410,7 +438,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
userInfo.setNickname(roomInfoResp.getSong_user_info().getNickname());
|
||||
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getSong_user_info().getUser_id()));
|
||||
userInfo.setPit_number("0");
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(),0, getParentFragmentManager());
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), 0, getParentFragmentManager());
|
||||
} else if (id == R.id.ll_bz) {
|
||||
if (isRotate) {
|
||||
AgoraManager.getInstance(getActivity()).selectAudioTrack(0);
|
||||
@@ -549,7 +577,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
if (mBinding.muZc.pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(2, -1);
|
||||
parentFragment.switchMic(2);
|
||||
}else {
|
||||
} else {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
@@ -593,6 +621,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
|
||||
if (pitBean.getPit_number().equals("9")) {
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muZc;
|
||||
@@ -619,7 +648,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
roomInfoResp.getSong_pit_list().add(pitBean);
|
||||
}
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
@@ -708,6 +737,44 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
}
|
||||
}
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
} else if (messageEvent.getMsgType() == 1035) {
|
||||
RoomPitBean pitBean = mBinding.muZc.pitBean;
|
||||
if (pitBean.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mBinding.muZc.setData(pitBean);
|
||||
}
|
||||
RoomPitBean pitBean1 = mBinding.muJb.pitBean;
|
||||
if (pitBean1.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
pitBean1.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean1.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean1.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean1.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean1.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mBinding.muJb.setData(pitBean1);
|
||||
}
|
||||
RoomPitBean pitBean2 = mBinding.muYc.pitBean;
|
||||
if (pitBean2.getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
pitBean2.setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
pitBean2.setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
pitBean2.setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
pitBean2.setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
pitBean2.setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
mBinding.muYc.setData(pitBean2);
|
||||
}
|
||||
for (int i = 0; i < roomInfoResp.getSong_pit_list().size(); i++) {
|
||||
if (roomInfoResp.getSong_pit_list().get(i).getUser_id().equals(messageEvent.getText().getFromUserInfo().getUser_id() + "")) {
|
||||
roomInfoResp.getSong_pit_list().get(i).setCharm(messageEvent.getText().getFromUserInfo().getCharm());
|
||||
roomInfoResp.getSong_pit_list().get(i).setAvatar(messageEvent.getText().getFromUserInfo().getAvatar());
|
||||
roomInfoResp.getSong_pit_list().get(i).setNickname(messageEvent.getText().getFromUserInfo().getNickname());
|
||||
roomInfoResp.getSong_pit_list().get(i).setSex(messageEvent.getText().getFromUserInfo().getSex() + "");
|
||||
roomInfoResp.getSong_pit_list().get(i).setDress(messageEvent.getText().getFromUserInfo().getDress());
|
||||
}
|
||||
}
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,6 +862,26 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
RoomPitBean pitBean= mBinding.muZc.pitBean;
|
||||
RoomPitBean pitBean2= mBinding.muJb.pitBean;
|
||||
RoomPitBean pitBean3= mBinding.muYc.pitBean;
|
||||
for (UserOnlineStatusBean bean : list) {
|
||||
if (pitBean != null && pitBean.getUser_id() != null && !pitBean.getUser_id().isEmpty()){
|
||||
if (bean.getUser_id().equals(pitBean.getUser_id())){
|
||||
mBinding.muZc.setOnlineStatus(bean);
|
||||
}
|
||||
}
|
||||
if (pitBean2 != null && pitBean2.getUser_id() != null && !pitBean2.getUser_id().isEmpty()){
|
||||
if (bean.getUser_id().equals(pitBean2.getUser_id())){
|
||||
mBinding.muJb.setOnlineStatus(bean);
|
||||
}
|
||||
}
|
||||
if (pitBean3 != null && pitBean3.getUser_id() != null && !pitBean3.getUser_id().isEmpty()){
|
||||
if (bean.getUser_id().equals(pitBean3.getUser_id())){
|
||||
mBinding.muYc.setOnlineStatus(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,9 @@ import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
import com.qxcm.moduleutil.widget.GifAvatarOvalView;
|
||||
import com.qxcm.moduleutil.widget.RoomDefaultWheatView;
|
||||
import com.qxcm.moduleutil.widget.RoomMakeWheatView;
|
||||
import com.qxcm.moduleutil.widget.RoomSingSongWheatView;
|
||||
import com.qxcm.moduleutil.widget.WheatLayoutManager;
|
||||
import com.qxcm.moduleutil.widget.WheatLayoutSingManager;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommonDialog;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -95,7 +97,8 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
protected RoomInfoResp roomInfoRespPk;
|
||||
protected String pitNumber;//当前点击的麦序
|
||||
protected CommonDialog commonDialog;
|
||||
private WheatLayoutManager wheatLayoutManager;
|
||||
// private WheatLayoutManager wheatLayoutManager;
|
||||
private WheatLayoutSingManager wheatLayoutSingManager;
|
||||
private WheatLayoutManager wheatLayoutManager1;
|
||||
private WheatLayoutManager wheatLayoutManager2;
|
||||
|
||||
@@ -105,7 +108,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
private PopupWindow popupWindow;
|
||||
CountDownTimer mCountDownTimer;
|
||||
CountDownTimer mCountDownTimersta;
|
||||
|
||||
List<RoomPitBean> pitList ;
|
||||
public static SingSongFragment newInstance(RoomInfoResp roomInfo) {
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("roomInfo", roomInfo);
|
||||
@@ -128,14 +131,30 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
pitList= new ArrayList<>();
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
}
|
||||
// 初始化 PopupWindow
|
||||
initPopupWindow();
|
||||
isWhether();
|
||||
|
||||
tzblChanged();
|
||||
}
|
||||
|
||||
private void initWheatLayout() {
|
||||
|
||||
if ( roomInfoRespPk==null|| roomInfoRespPk.getPk_info() == null){
|
||||
for (int i=0;i<pitList.size();i++){
|
||||
wheatLayoutSingManager.updateSingleWheat(roomInfoResp.getRoom_info().getPit_list().get(i),i+1);
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// for (int i=0;i<pitList.size();i++){
|
||||
// wheatLayoutManager1.updateSingleWheat(roomInfoResp.getRoom_info().getPit_list().get(i),i+1);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -306,7 +325,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
|
||||
if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
} else {
|
||||
updateWheatData();
|
||||
}
|
||||
@@ -321,10 +340,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.cl.setVisibility(View.GONE);
|
||||
FlexboxLayout flexboxLayout = mBinding.flexboxLayout;
|
||||
wheatLayoutManager = new WheatLayoutManager(requireContext(), flexboxLayout);
|
||||
wheatLayoutManager.setOnWheatClickListener(new WheatLayoutManager.OnWheatClickListener() {
|
||||
wheatLayoutSingManager = new WheatLayoutSingManager(requireContext(), flexboxLayout);
|
||||
wheatLayoutSingManager.setOnWheatClickListener(new WheatLayoutSingManager.OnWheatClickListener() {
|
||||
@Override
|
||||
public void onWheatClick(RoomDefaultWheatView view, int pitNumber1) {
|
||||
public void onWheatClick(RoomSingSongWheatView view, int pitNumber1) {
|
||||
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber1 - 1);
|
||||
|
||||
// 可选:点击事件处理
|
||||
@@ -350,17 +369,26 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMakeWheatClick(RoomDefaultWheatView view, int pitNumber) {
|
||||
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 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);
|
||||
// initWheatLayout();
|
||||
|
||||
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
|
||||
wheatLayoutManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
||||
wheatLayoutSingManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void isWhether() {
|
||||
@@ -368,10 +396,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.cl.setVisibility(View.GONE);
|
||||
FlexboxLayout flexboxLayout = mBinding.flexboxLayout;
|
||||
wheatLayoutManager = new WheatLayoutManager(requireContext(), flexboxLayout);
|
||||
wheatLayoutManager.setOnWheatClickListener(new WheatLayoutManager.OnWheatClickListener() {
|
||||
wheatLayoutSingManager = new WheatLayoutSingManager(requireContext(), flexboxLayout);
|
||||
wheatLayoutSingManager.setOnWheatClickListener(new WheatLayoutSingManager.OnWheatClickListener() {
|
||||
@Override
|
||||
public void onWheatClick(RoomDefaultWheatView view, int pitNumber1) {
|
||||
public void onWheatClick(RoomSingSongWheatView view, int pitNumber1) {
|
||||
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber1 - 1);
|
||||
|
||||
// 可选:点击事件处理
|
||||
@@ -399,15 +427,24 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMakeWheatClick(RoomDefaultWheatView view, int pitNumber) {
|
||||
public void onMakeWheatClick(RoomSingSongWheatView view, int pitNumber) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
|
||||
wheatLayoutManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
||||
wheatLayoutSingManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
||||
}
|
||||
// initWheatLayout();
|
||||
} else {
|
||||
mBinding.flexboxLayout.setVisibility(View.GONE);
|
||||
mBinding.cl.setVisibility(View.VISIBLE);
|
||||
@@ -585,9 +622,9 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
if (id == R.id.bt_sta) {
|
||||
PkTimeDialogFragment.show(roomInfoRespPk.getPk_info().getPk_id(), getChildFragmentManager());
|
||||
} else if (id == R.id.bt_stop) {
|
||||
if (roomInfoRespPk.getPk_info().getPk_part().equals("3") && pkStatus==0){
|
||||
if (roomInfoRespPk.getPk_info().getPk_part().equals("3") && pkStatus == 0) {
|
||||
pkStutas();
|
||||
}else {
|
||||
} else {
|
||||
MvpPre.endPk(roomInfoRespPk.getPk_info().getPk_id(), "3", SpUtil.getUserId() + "");
|
||||
}
|
||||
} else if (id == R.id.im_mkf) {
|
||||
@@ -648,20 +685,20 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
@Override
|
||||
public void setMutePit(String pitNumber, String is_mute) {
|
||||
roomPitBean.setIs_mute(Integer.parseInt(is_mute.equals("2") ? "1" : "0"));
|
||||
wheatLayoutManager.updateSingleWheat(roomPitBean, Integer.parseInt(pitNumber));
|
||||
wheatLayoutSingManager.updateSingleWheat(roomPitBean, Integer.parseInt(pitNumber));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockPit(String pitNumber, String is_lock) {
|
||||
roomPitBean.setIs_lock(Integer.parseInt(is_lock));
|
||||
wheatLayoutManager.updateSingleWheat(roomPitBean, Integer.parseInt(pitNumber));
|
||||
wheatLayoutSingManager.updateSingleWheat(roomPitBean, Integer.parseInt(pitNumber));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRoomInfo(RoomInfoResp resp) {
|
||||
roomInfoResp = resp;
|
||||
isWhether2();
|
||||
|
||||
tzblChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -669,11 +706,13 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
roomInfoRespPk = resp;
|
||||
// isWhether();
|
||||
pkView();
|
||||
tzblChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRoomInfoUp(RoomInfoResp resp) {
|
||||
roomInfoResp = resp;
|
||||
tzblChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -687,18 +726,13 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
if (list != null) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
EventBus.getDefault().post(list.get(i));
|
||||
if ( roomInfoRespPk==null|| roomInfoRespPk.getPk_info() == null) {
|
||||
wheatLayoutSingManager.updateSingleOnlineWheat(list.get(i));
|
||||
}else{
|
||||
wheatLayoutManager1.updateSingleOnlineWheat(list.get(i));
|
||||
}
|
||||
// EventBus.getDefault().post(list.get(i));
|
||||
}
|
||||
|
||||
// handler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// for (int i = 0; i < list.size(); i++) {
|
||||
// EventBus.getDefault().postSticky(list.get(i));
|
||||
//// EventBus.getDefault().post(list.get(i));
|
||||
// }
|
||||
// }
|
||||
// }, 10000); // 5秒后执行
|
||||
}
|
||||
}
|
||||
|
||||
@@ -760,6 +794,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
}
|
||||
FlexboxLayout flexboxLayout2 = mBinding.flexboxLayout2;
|
||||
flexboxLayout2.removeAllViews();
|
||||
wheatLayoutManager2 = new WheatLayoutManager(requireContext(), flexboxLayout2);
|
||||
for (RoomPitBean pitBean : roomInfoRespPk.getRoom_info().getPit_list()) {
|
||||
pitBean.set_pk(true);
|
||||
@@ -982,10 +1017,11 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
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) {
|
||||
wheatLayoutManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
} else {
|
||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
}
|
||||
@@ -1010,9 +1046,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
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) {
|
||||
wheatLayoutManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
} else {
|
||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(message.getText().getPit_number()));
|
||||
}
|
||||
@@ -1032,7 +1069,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1059,7 +1096,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
} else {
|
||||
mBinding.btSta.setVisibility(INVISIBLE);
|
||||
}
|
||||
parentFragment.setRoleType(5,-11);
|
||||
parentFragment.setRoleType(5, -11);
|
||||
}
|
||||
} else if (message.getMsgType() == 1031) {
|
||||
countDownTime(Long.parseLong(message.getText().getPk_end_times()), 1);
|
||||
@@ -1069,13 +1106,15 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// pkResultDialogFragment.show();
|
||||
showCountDownDialog(requireContext(), message);
|
||||
ivitTop(message);
|
||||
parentFragment.setRoleType(3,-11);
|
||||
parentFragment.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);
|
||||
parentFragment.setRoleType(3, -11);
|
||||
roomInfoRespPk = null;
|
||||
|
||||
} else if (message.getMsgType() == 1015) {
|
||||
String roomIdA = message.getText().getRoom_id_a();
|
||||
String roomIdB = message.getText().getRoom_id_b();
|
||||
@@ -1114,13 +1153,25 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
} else if (message.getMsgType() == 1021) {
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
pitBean.setCharm("0");
|
||||
wheatLayoutManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1162,16 +1213,16 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
mBinding.imStart2.setVisibility(View.VISIBLE);
|
||||
mBinding.imStart.setVisibility(VISIBLE);
|
||||
if (message.getText().getType() == 0) {
|
||||
pkStatus=0;
|
||||
pkStatus = 0;
|
||||
mBinding.imStart.setImageResource(com.qxcm.moduleutil.R.mipmap.fail);
|
||||
mBinding.imStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.victory);
|
||||
|
||||
} else if (message.getText().getType() == 1) {
|
||||
pkStatus=1;
|
||||
pkStatus = 1;
|
||||
mBinding.imStart.setImageResource(com.qxcm.moduleutil.R.mipmap.victory);
|
||||
mBinding.imStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.fail);
|
||||
} else if (message.getText().getType() == 2) {
|
||||
pkStatus=2;
|
||||
pkStatus = 2;
|
||||
mBinding.imStart.setImageResource(com.qxcm.moduleutil.R.mipmap.ping);
|
||||
mBinding.imStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.ping);
|
||||
}
|
||||
|
||||
@@ -83,4 +83,9 @@ public class RoomAuctionPresenter extends BasePresenter<RoomAuctionContacts.View
|
||||
public void auctionMode(String roomId, String labelId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(String userId, String roomid) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,14 @@ import android.content.Context;
|
||||
|
||||
import com.example.moduleroom.contacts.RoomAuctionContacts;
|
||||
import com.qxcm.moduleutil.bean.RoomTime;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.http.RetrofitClient;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RoomAuctionPresenterTow extends BasePresenter<RoomAuctionContacts.View> implements RoomAuctionContacts.IRoomDataListPre {
|
||||
@@ -93,6 +96,19 @@ public class RoomAuctionPresenterTow extends BasePresenter<RoomAuctionContacts.V
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void userOnlineStatus(String userId, String roomid) {
|
||||
api.userOnlineStatus(userId, roomid, new BaseObserver<List<UserOnlineStatusBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<UserOnlineStatusBean> userOnlineStatusBean) {
|
||||
MvpRef.get().userOnlineStatus(userOnlineStatusBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.qxcm.moduleutil.rtc.RtcManager;
|
||||
import com.qxcm.moduleutil.utils.GsonUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -34,8 +35,10 @@ import java.util.List;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RoomPresenter extends BasePresenter<RoomContacts.View> implements RoomContacts.IRoomPre {
|
||||
RoomContacts.View mView;
|
||||
public RoomPresenter(RoomContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
// TODO: 2025/6/10 加入房间
|
||||
@@ -77,6 +80,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
// 2. 加入房间
|
||||
// rtcCore.joinRoom(token, roomId, uid, enableMic);
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().roomInfo(resp);
|
||||
|
||||
}
|
||||
@@ -109,6 +115,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(RoomOnline roomOnlineBeans) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getRoomOnline(roomOnlineBeans);
|
||||
}
|
||||
});
|
||||
@@ -124,6 +133,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().applyPit();
|
||||
}
|
||||
});
|
||||
@@ -139,6 +151,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().downPit();
|
||||
}
|
||||
});
|
||||
@@ -155,6 +170,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().applySong();
|
||||
}
|
||||
});
|
||||
@@ -170,6 +188,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().agreeSong();
|
||||
}
|
||||
});
|
||||
@@ -186,6 +207,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().agreeSong();
|
||||
}
|
||||
});
|
||||
@@ -208,6 +232,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
SpUtil.setRtmToken(rtm_token);
|
||||
int uid = SpUtil.getUserId(); // 0 表示由 Agora 自动生成 UID
|
||||
boolean enableMic = false; // 是否开启麦克风
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().postRoomInfo(roomInfoResp);
|
||||
}
|
||||
});
|
||||
@@ -223,6 +250,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(List<RoomCharmRankBean> roomCharmRankBeans) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getCharmRank(roomCharmRankBeans);
|
||||
}
|
||||
});
|
||||
@@ -238,6 +268,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().changeSong();
|
||||
}
|
||||
});
|
||||
@@ -253,6 +286,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().hostUserPit();
|
||||
}
|
||||
});
|
||||
@@ -268,7 +304,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().quitRoom();
|
||||
}
|
||||
});
|
||||
@@ -284,6 +322,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().userGuanzSuccess(s);
|
||||
}
|
||||
});
|
||||
@@ -300,6 +341,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().acceptPk();
|
||||
}
|
||||
});
|
||||
@@ -315,6 +359,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().clearUserCharm();
|
||||
}
|
||||
});
|
||||
@@ -330,6 +377,9 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(List<UserOnlineStatusBean> userOnlineStatusBean) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().userOnlineStatus(userOnlineStatusBean);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,11 +7,15 @@ import com.qxcm.moduleutil.bean.room.RoomSettingBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RoomSettingPresenter extends BasePresenter<RoomSettingContacts.View> implements RoomSettingContacts.IRoomPre{
|
||||
RoomSettingContacts.View mView;
|
||||
public RoomSettingPresenter(RoomSettingContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -24,6 +28,9 @@ public class RoomSettingPresenter extends BasePresenter<RoomSettingContacts.View
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().changeRoomSuccess(s, position,bean);
|
||||
}
|
||||
|
||||
@@ -49,6 +56,9 @@ public class RoomSettingPresenter extends BasePresenter<RoomSettingContacts.View
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef==null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().changeRoomType(string);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import com.example.moduleroom.contacts.SingSongContacts;
|
||||
import com.qxcm.moduleutil.base.BaseRoomPresenter;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.PkSwTokenBean;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
@@ -86,9 +87,8 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
||||
if (type==1) {
|
||||
if (roomInfoResp.getPk_info() != null) {
|
||||
if (number.equals("9")) {
|
||||
postRoomSwToken(roomId,uid);
|
||||
///添加多频道
|
||||
AgoraManager.getInstance(getView().getSelfActivity())
|
||||
.joinChannelEx(rtm_token, roomId, uid);
|
||||
}
|
||||
}
|
||||
MvpRef.get().postRoomInfoPk(roomInfoResp);
|
||||
@@ -133,4 +133,23 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void postRoomSwToken(String roomId,int uid) {
|
||||
api.postRoomSwToken(roomId, new BaseObserver<PkSwTokenBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(PkSwTokenBean pkSwTokenBean) {
|
||||
if (pkSwTokenBean!=null){
|
||||
if (pkSwTokenBean.getAgora_token() != null){
|
||||
AgoraManager.getInstance(getView().getSelfActivity())
|
||||
.joinChannelEx(pkSwTokenBean.getAgora_token(), roomId, uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,16 @@
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top" />-->
|
||||
|
||||
<!-- <ScrollView-->
|
||||
<!-- android:id="@+id/scrollView"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/room_top"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent">-->
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/vp_room_pager"
|
||||
android:layout_width="0dp"
|
||||
@@ -70,8 +80,9 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_top" />
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/room_top"
|
||||
/>
|
||||
<!-- </ScrollView>-->
|
||||
<com.qxcm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_gift"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -496,13 +496,13 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<!-- <ViewStub-->
|
||||
<!-- android:id="@+id/stub_buttons"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout="@layout/top_overlay_buttons"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<ViewStub
|
||||
android:id="@+id/stub_buttons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout="@layout/top_overlay_buttons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -97,7 +97,8 @@
|
||||
android:text="转币"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/kb"
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="460dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_room_gift"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
@@ -150,7 +150,7 @@
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/gift_t" />
|
||||
android:src="@mipmap/jinb" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reward_gift"
|
||||
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/room_rank_top3_headIcon"
|
||||
android:layout_width="@dimen/dp_58"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_top3"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@@ -148,8 +148,8 @@
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:background="@mipmap/rank_im_t3"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_top3"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout="@layout/top_overlay_buttons"
|
||||
android:visibility="gone"/>
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user