封版羽声,作为最后的基础版
This commit is contained in:
@@ -53,5 +53,8 @@ dependencies {
|
||||
annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
|
||||
|
||||
implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
|
||||
|
||||
api project(':tuiconversation')
|
||||
api project(':tuichat')
|
||||
}
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -19,7 +19,7 @@
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:enableOnBackInvokedCallback="false"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:screenOrientation="sensor" />
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<service
|
||||
android:name=".service.MediaProjectionService"
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.example.moduleroom.activity;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import static com.liulishuo.okdownload.OkDownloadProvider.context;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
@@ -38,6 +40,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.moduleroom.R;
|
||||
@@ -57,7 +60,9 @@ import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.HeadlineBean;
|
||||
import com.qxcm.moduleutil.bean.HeadlineEvent;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RankInfo;
|
||||
import com.qxcm.moduleutil.bean.room.RoomClearCardiacAllModel;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.databinding.RoomDialogMusicWindowOpenBinding;
|
||||
import com.qxcm.moduleutil.dialog.RechargeDialogFragment;
|
||||
@@ -65,8 +70,10 @@ import com.qxcm.moduleutil.event.ColoseCardEvent;
|
||||
import com.qxcm.moduleutil.event.EffectEvent;
|
||||
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.RoomWheatEvent;
|
||||
import com.qxcm.moduleutil.event.SurfaceEvent;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.http.RetrofitClient;
|
||||
import com.qxcm.moduleutil.interfaces.OnMusicItemClickListener;
|
||||
@@ -101,6 +108,7 @@ import com.qxcm.moduleutil.widget.CustomMusicFloatingView;
|
||||
import com.qxcm.moduleutil.widget.MusicView;
|
||||
import com.qxcm.moduleutil.widget.SilentCountDownTimer;
|
||||
import com.qxcm.moduleutil.widget.ViewUtils;
|
||||
import com.qxcm.moduleutil.widget.floatingView.Floa;
|
||||
import com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
@@ -110,6 +118,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.agora.musiccontentcenter.Music;
|
||||
@@ -119,7 +128,7 @@ import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||
public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBinding> implements RoomContacts.View,
|
||||
EasyPermissions.PermissionCallbacks {
|
||||
EasyPermissions.PermissionCallbacks, MessageListenerSingleton.OnMessageReceivedListener {
|
||||
|
||||
private RoomFragment roomFragment;
|
||||
CommonPageAdapter commonPageAdapter;
|
||||
@@ -143,7 +152,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private CustomMusicFloatingView customMusicFloatingView;
|
||||
private int number = 0;
|
||||
|
||||
private FloatingMagnetView floatingMagnetView;
|
||||
private Floa floatingMagnetView;
|
||||
private FrameLayout fullScreenContainer;
|
||||
private boolean isFullScreen = false;
|
||||
private ImageView ivExitFullscreen;
|
||||
@@ -171,16 +180,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
// if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// 禁用系统手势导航
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
@@ -192,28 +198,42 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(SurfaceView surfaceView) {
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
floatingMagnetView = findViewById(R.id.flaoat);
|
||||
FrameLayout container = floatingMagnetView.findViewById(R.id.fl_screenshare);
|
||||
if (surfaceView == null) {
|
||||
runOnUiThread(() -> {
|
||||
mBinding.flaoat.setVisibility(GONE);
|
||||
container.removeAllViews();
|
||||
});
|
||||
} else {
|
||||
runOnUiThread(() -> {
|
||||
mBinding.flaoat.setVisibility(VISIBLE);
|
||||
container.removeAllViews();
|
||||
container.addView(surfaceView);
|
||||
public void roomInfoEvent(SurfaceEvent surfaceView) {
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {//判断是否是电影房
|
||||
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) {
|
||||
runOnUiThread(() -> {
|
||||
mBinding.flaoat.setVisibility(GONE);
|
||||
container.removeAllViews();
|
||||
});
|
||||
} else {
|
||||
runOnUiThread(() -> {
|
||||
mBinding.flaoat.setVisibility(VISIBLE);
|
||||
container.removeAllViews();
|
||||
container.addView(surfaceView.getSurfaceView());
|
||||
// mBinding.flaoat.setVisibility(VISIBLE);
|
||||
// mBinding.flScreenshare.removeAllViews();
|
||||
// mBinding.flScreenshare.addView(surfaceView);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void hideInput(RoomInputHideEvent event) {
|
||||
if (event.hide) {
|
||||
// mBinding.vpRoomPager.setScroll(false);
|
||||
} else {
|
||||
// mBinding.vpRoomPager.setScroll(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(ColoseCardEvent messageEvent) {
|
||||
mBinding.flaoat.setVisibility(GONE);
|
||||
@@ -251,6 +271,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
ivQuan.setOnClickListener(v -> toggleFullScreen());
|
||||
ivExitFullscreen.setOnClickListener(v -> exitFullScreen());
|
||||
|
||||
LogUtils.e("lxj", "开始时间:" + TimeUtils.date2String(new Date()));
|
||||
|
||||
}
|
||||
|
||||
@@ -276,7 +297,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// giftCountTimer.cancel();
|
||||
// giftCountTimer = null;
|
||||
// }
|
||||
RetrofitClient.getInstance().roomGift(giftGiveEvent.getRoom_id(), giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), giftGiveEvent.getUserId(),"1",giftGiveEvent.getPit(), new BaseObserver<String>(){
|
||||
RetrofitClient.getInstance().roomGift(giftGiveEvent.getRoom_id(), giftGiveEvent.getRoonGiftModel().getGift_id(), giftGiveEvent.getNum(), giftGiveEvent.getUserId(), "1", giftGiveEvent.getPit(), new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
// showGiftGiveProgress();
|
||||
@@ -296,7 +317,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
if (!TextUtils.isEmpty(msg) && msg.contains("当前余额不足")) {
|
||||
com.hjq.toast.ToastUtils.show("当前余额不足,请充值");
|
||||
ThreadUtils.runOnUiThreadDelayed(() -> {
|
||||
RechargeDialogFragment.show(roomId, getSupportFragmentManager());
|
||||
RechargeDialogFragment.show(roomId,null, getSupportFragmentManager());
|
||||
// DialogUtils.showDialogFragment(ARouter.getInstance().build(ARouteConstants.RECHARGE_DIALOG).navigation());
|
||||
}, 1400);
|
||||
}
|
||||
@@ -315,7 +336,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
giftGiveEvent = event;
|
||||
showGiftGiveProgress();
|
||||
}
|
||||
private int giftProgress=0;
|
||||
|
||||
private int giftProgress = 0;
|
||||
private CountDownTimer giftCountTimer;
|
||||
|
||||
private void startGiftProgressTime() {
|
||||
@@ -421,6 +443,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
ivQuan.setVisibility(View.VISIBLE);
|
||||
ivExitFullscreen.setVisibility(View.GONE); // 隐藏退出按钮
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (!EasyPermissions.hasPermissions(this, permissions)) {
|
||||
@@ -440,15 +463,37 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
likeUserAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
RoomOnlineDialogFragment.show(roomId, "", getSupportFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, "", mRoomUserBean, mRoomInfoResp, getSupportFragmentManager());
|
||||
}
|
||||
});
|
||||
// onChatRoomViewCreation();
|
||||
// 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);
|
||||
MvpPre.getRoomIn(roomId, password);
|
||||
MvpPre.getRoomOnline(roomId, "1", "10");
|
||||
|
||||
|
||||
// customMusicFloatingView.initView();
|
||||
// 使用 OnViewAttachListener 确保 View 已创建
|
||||
// 设置监听器,等待 View 创建完成
|
||||
@@ -456,7 +501,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
if (messageEvent.getMsgType() == 1005) {
|
||||
@@ -469,6 +513,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
roomSettingEvent.setRoom_up_pit_type(messageEvent.getText().getRoom_up_pit_type());
|
||||
roomSettingEvent.setType(messageEvent.getMsgType());
|
||||
mRoomBean.setRoom_up_pit_type(messageEvent.getText().getRoom_up_pit_type() + "");
|
||||
|
||||
EventBus.getDefault().post(mRoomBean);
|
||||
EventBus.getDefault().post(roomSettingEvent);
|
||||
} else if (messageEvent.getMsgType() == 1013) {
|
||||
@@ -501,11 +546,22 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// roomWheatEvent.setRoomId(roomId);
|
||||
// roomWheatEvent.setOccupied(true);
|
||||
// EventBus.getDefault().post(roomWheatEvent);
|
||||
if (messageEvent.getText().getPit_number().equals("9") && messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1004) {//下麦操作
|
||||
// RoomWheatEvent roomWheatEvent = new RoomWheatEvent();
|
||||
// roomWheatEvent.setRoomId(roomId);
|
||||
// roomWheatEvent.setOccupied(false);
|
||||
// EventBus.getDefault().post(roomWheatEvent);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId() && messageEvent.getText().getPit_number().equals("9")) {
|
||||
if (customMusicFloatingView != null) {
|
||||
customMusicFloatingView.destroy();
|
||||
AgoraManager.getInstance(RoomActivity.this).desMusic();
|
||||
isMusic = false;
|
||||
mBinding.roomTop.rl.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1020) {
|
||||
mRoomBean = messageEvent.getText().getRoomInfo();
|
||||
EventBus.getDefault().post(mRoomBean);
|
||||
@@ -526,9 +582,16 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
querenPk(messageEvent.getText().getText(), messageEvent.getText().getPkId());
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1021) {
|
||||
// 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() + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void querenPk(String text, String pk_id) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(this,
|
||||
@@ -569,6 +632,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
mBinding.roomTop.getRoot().setVisibility(is ? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
public void setDiany(boolean is) {
|
||||
// mBinding.flaoat.setVisibility(is? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 特效设置
|
||||
*/
|
||||
@@ -600,7 +667,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.btn_follow) {
|
||||
MvpPre.userGuanz(mRoomOwnerBean.getUser_id(), "2");
|
||||
MvpPre.userGuanz(mRoomInfoResp.getRoom_info().getRoom_id(), "2");
|
||||
} else if (id == R.id.btn_notice) {
|
||||
// RoomTipsView.show(this,view,"公告","公告内容");
|
||||
RoomNoticeDialogFragment roomNoticeDialogFragment = new RoomNoticeDialogFragment(this);
|
||||
@@ -634,12 +701,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
});
|
||||
bottomSheet.show(getSupportFragmentManager(), "ExitRoomBottomSheet");
|
||||
} else if (id == R.id.tv_num) {
|
||||
RoomOnlineDialogFragment.show(roomId, "", getSupportFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, "", mRoomUserBean, mRoomInfoResp, getSupportFragmentManager());
|
||||
} else if (id == R.id.rl) {
|
||||
com.hjq.toast.ToastUtils.show("清楚魅力值");
|
||||
MvpPre.clearUserCharm(roomId, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_room;
|
||||
@@ -657,7 +725,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
public void upRoomInfo(RoomInfoResp resp) {
|
||||
this.mRoomInfoResp = resp;
|
||||
if (mRoomInfoResp.getUser_info().getPit_number()==9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
@@ -673,6 +741,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
this.mRoomOwnerBean = resp.getRoom_owner();
|
||||
this.mPitList = mRoomBean.getPit_list();
|
||||
|
||||
if (roomBean.getType_id().equals("6")){
|
||||
// mBinding.ivBg.setImageDrawable(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.cabin_bj));
|
||||
}
|
||||
|
||||
ImageUtils.loadHeadCC(resp.getRoom_info().getRoom_cover(), mBinding.roomTop.avatar);
|
||||
mBinding.roomTop.name.setText(roomBean.getRoom_name());
|
||||
mBinding.roomTop.idVal.setText("ID:" + roomBean.getRoom_number());
|
||||
@@ -687,6 +759,21 @@ 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);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
// }
|
||||
|
||||
if (!isFinishing() && !isDestroyed()) {
|
||||
|
||||
if (roomFragment == null || !roomFragment.isAdded()) {
|
||||
@@ -702,13 +789,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
Log.e("Fragment", "Fragment transaction skipped due to state loss.");
|
||||
}
|
||||
|
||||
// 更新引用
|
||||
// roomFragment = newFragment;
|
||||
// if (!roomBean.getType_id().equals("6")) {
|
||||
// changeBackgroundColor(roomBean.getRoom_background());
|
||||
// } else {
|
||||
// changeBackground(com.qxcm.moduleutil.R.mipmap.cabin_bj);
|
||||
// }
|
||||
|
||||
CommonAppContext.getInstance().isPlaying = true;
|
||||
CommonAppContext.getInstance().playId = roomId;
|
||||
@@ -722,7 +802,8 @@ 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("1") && roomBean.getLabel_id().equals("2")) {
|
||||
if ((roomBean.getType_id().equals("1") && roomBean.getLabel_id().equals("2")) || (roomBean.getType_id().equals("3") && roomBean.getLabel_id().equals("2")
|
||||
|| (roomBean.getType_id().equals("4") && roomBean.getLabel_id().equals("2")))) {
|
||||
AgoraManager.getInstance(this).setBjMusic(false);
|
||||
|
||||
} else {
|
||||
@@ -734,9 +815,20 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
toutiao();
|
||||
upRoomInfo(resp);
|
||||
|
||||
// if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
// mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
// }
|
||||
}
|
||||
|
||||
public void toutiao(){
|
||||
private static final long CLICK_DELAY = 500; // 延迟时间,单位毫秒
|
||||
private boolean isClick = false;
|
||||
private boolean isIntercepted = false;
|
||||
private long downTime;
|
||||
|
||||
public void toutiao() {
|
||||
if (mRoomInfoResp.getRoom_info().getHead_line() != null) {
|
||||
mBinding.flaoatZuoji.setVisibility(VISIBLE);
|
||||
// 设置 OnTouchListener,强制悬浮框自己处理拖动
|
||||
@@ -747,10 +839,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// mBinding.cc.setOnClickListener(v -> {
|
||||
// mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
// });
|
||||
|
||||
mBinding.ivQuanQiang.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
PublishCommentDialogFragment.show(roomId,getSupportFragmentManager());
|
||||
PublishCommentDialogFragment.show(roomId, getSupportFragmentManager());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -758,36 +851,92 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", mRoomInfoResp.getRoom_info().getHead_line().getRoom_id() ).navigation();
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", mRoomInfoResp.getRoom_info().getHead_line().getRoom_id()).navigation();
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imYc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (imYc){
|
||||
if (imYc) {
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
imYc = false;
|
||||
}else {
|
||||
} else {
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
imYc = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
mBinding.imHq.setOnClickListener(new View.OnClickListener(){
|
||||
mBinding.imHq.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!imYc){
|
||||
if (!imYc) {
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
imYc = true;
|
||||
}else {
|
||||
} else {
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
imYc = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imHq.setOnTouchListener(new View.OnTouchListener() {
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
|
||||
|
||||
// // 优先处理悬浮框的触摸事件
|
||||
if (mBinding.flaoatZuoji.onTouchEvent(motionEvent)) {
|
||||
return true;
|
||||
}
|
||||
// 如果悬浮框的触摸事件未处理,则处理自身的触摸事件
|
||||
return view.onTouchEvent(motionEvent);
|
||||
}
|
||||
});
|
||||
|
||||
final GestureDetector gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
|
||||
@Override
|
||||
public boolean onDown(MotionEvent e) {
|
||||
return true; // 必须返回true以便onShowPress和onSingleTapUp被调用
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSingleTapUp(MotionEvent e) {
|
||||
// 处理点击事件
|
||||
if (!imYc) {
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
imYc = true;
|
||||
} else {
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
imYc = false;
|
||||
}
|
||||
return true; // 消费事件
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
// 处理滑动事件
|
||||
mBinding.flaoatZuoji.onTouchEvent(e2); // 直接传递滑动事件给目标视图
|
||||
return true; // 消费事件,防止父视图处理滑动事件
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imHq.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
return gestureDetector.onTouchEvent(event); // 让GestureDetector处理触摸事件
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.headAvate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
silentCountDownTimer = new SilentCountDownTimer();
|
||||
silentCountDownTimer.setOnCountDownFinishListener(() -> {
|
||||
@@ -798,10 +947,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
// 启动倒计时(例如:目标时间戳 1752661716)
|
||||
silentCountDownTimer.start(Long.parseLong(mRoomInfoResp.getRoom_info().getHead_line().getEnd_time()));
|
||||
}else {
|
||||
} else {
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void hideSomeViewOrDoSomething() {
|
||||
runOnUiThread(() -> {
|
||||
// 执行你需要的操作,比如隐藏某个控件
|
||||
@@ -809,6 +959,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onHeadlineEvent(HeadlineBean event) {
|
||||
mRoomInfoResp.getRoom_info().setHead_line(event);
|
||||
@@ -847,14 +998,18 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
public void logOutEvent(MusicEvent musicEvent) {
|
||||
// mBinding.musicView.setVisibility(VISIBLE);
|
||||
// musicWindowControl.show(); // <<< 添加这行代码
|
||||
xunf();
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, getSupportFragmentManager());
|
||||
if (!isMusic) {
|
||||
xunf();
|
||||
isMusic = true;
|
||||
}
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, 2, getSupportFragmentManager());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 背景音乐
|
||||
*/
|
||||
private boolean isMusic = false;
|
||||
|
||||
private void xunf() {
|
||||
musicWindowControl = FxScopeHelper.builder()
|
||||
@@ -869,13 +1024,14 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
public void onMinimize() {
|
||||
customMusicFloatingView.destroy();
|
||||
AgoraManager.getInstance(RoomActivity.this).desMusic();
|
||||
isMusic = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpenList() {
|
||||
// 打开音乐列表
|
||||
// ToastUtils.showShort("打开音乐列表");
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, getSupportFragmentManager());
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, 2, getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -907,6 +1063,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
customMusicFloatingView.initView(); // 这里 fxControl.getView() 不再为 null
|
||||
customMusicFloatingView.updatePlayState(false);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1034,8 +1192,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
CommonAppContext.getInstance().isPlaying = false;
|
||||
CommonAppContext.getInstance().isShow = false;
|
||||
// AgoraManager.getInstance(this).destroy();
|
||||
AgoraManager.getInstance(this).stopScreenCapture();
|
||||
AgoraManager.getInstance(this).leaveRoom();
|
||||
AgoraManager.getInstance(this).destroy();
|
||||
|
||||
V2TIMManager.getInstance().quitGroup("room" + roomId, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
@@ -1066,6 +1226,17 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUserCharm() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
SpUtil.setUserOnline(GsonUtils.toJson(list));
|
||||
|
||||
}
|
||||
|
||||
private void queren1(String nickname) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(this,
|
||||
@@ -1181,4 +1352,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
customMusicFloatingView.updateProgress(Math.toIntExact(musicPlayBean.getPosition()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessageReceived(RoomMessageEvent message) {
|
||||
EventBus.getDefault().post(message);
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,13 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
List currData = new ArrayList();
|
||||
if (type == SHOW_TYPE_ALL){
|
||||
currData.addAll(allMsgList);
|
||||
// if (allMsgList.size() > 20) {
|
||||
// // 只添加最近的20条消息
|
||||
// int startIndex = Math.max(0, allMsgList.size() - 20);
|
||||
// currData.addAll(allMsgList.subList(startIndex, allMsgList.size()));
|
||||
// }else {
|
||||
// currData.addAll(allMsgList);
|
||||
// }
|
||||
}else if(type == SHOW_TYPE_USER){
|
||||
currData.addAll(userMsgList);
|
||||
}else if(type == SHOW_TYPE_SYSTEM){
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.BaseWheatView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -39,8 +40,13 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
helper.setVisible(R.id.tv_pit, false);
|
||||
} else {
|
||||
helper.setVisible(R.id.tv_pit, true);
|
||||
helper.setText(R.id.tv_pit, String.format("%s号麦", item.getPit_number()));
|
||||
if (item.getPit_number().equals("8")){
|
||||
int pitNumber = Integer.parseInt(item.getPit_number());
|
||||
if (pitNumber>10){
|
||||
helper.setText(R.id.tv_pit, item.getNickname());
|
||||
}else {
|
||||
helper.setText(R.id.tv_pit, String.format("%s号麦", item.getPit_number()));
|
||||
}
|
||||
if (item.getPit_number().equals("8")) {
|
||||
helper.setText(R.id.tv_pit, "嘉宾");
|
||||
}
|
||||
if (BaseWheatView.WHEAT_HOST.equals(item.getPit_number())) {
|
||||
@@ -51,9 +57,9 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.isSelect()){
|
||||
if (item.isSelect()) {
|
||||
helper.getView(R.id.tv_pit).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.gift_show);
|
||||
}else {
|
||||
} else {
|
||||
helper.getView(R.id.tv_pit).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.gift_show_b);
|
||||
}
|
||||
}
|
||||
@@ -103,11 +109,13 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
List<RewardUserBean> data = getData();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if (data.get(i).isSelect()) {
|
||||
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
||||
sb.append(",");
|
||||
if (!data.get(i).getUser_id().equals(SpUtil.getUserId()+"")) {
|
||||
if (data.get(i).isSelect()) {
|
||||
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(data.get(i).getUser_id());
|
||||
}
|
||||
sb.append(data.get(i).getUser_id());
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
@@ -165,7 +173,8 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
||||
List<RewardUserBean> data = getData();
|
||||
for (RewardUserBean item : data) {
|
||||
if (item.isSelect()) {
|
||||
ids.add(item.getUser_id());
|
||||
|
||||
ids.add(item.getUser_id());
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
|
||||
@@ -2,53 +2,73 @@ package com.example.moduleroom.adapter;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.moduleroom.R;
|
||||
import com.qxcm.moduleutil.bean.RelationshipBean;
|
||||
import com.qxcm.moduleutil.bean.TopRoom;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.TimeUtils;
|
||||
import com.zhpan.bannerview.BaseBannerAdapter;
|
||||
import com.zhpan.bannerview.BaseViewHolder;
|
||||
|
||||
|
||||
public class RelationshipAdapter extends BaseBannerAdapter<RelationshipBean> {
|
||||
public class RelationshipAdapter extends BaseQuickAdapter<RelationshipBean, com.chad.library.adapter.base.BaseViewHolder> {
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
public RelationshipAdapter() {
|
||||
super(R.layout.item_relationship);
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.onItemClickListener = listener;
|
||||
}
|
||||
@Override
|
||||
protected void bindData(BaseViewHolder<RelationshipBean> holder, RelationshipBean data, int position, int pageSize) {
|
||||
ImageUtils.loadHeadCC(data.getAvatar(), holder.itemView.findViewById(R.id.user_nav1));
|
||||
ImageUtils.loadHeadCC(data.getAvatar2(), holder.itemView.findViewById(R.id.user_nav2));
|
||||
holder.setText(R.id.tv_nickname, data.getNickname());
|
||||
holder.setText(R.id.tv_nickname2, data.getNickname2());
|
||||
holder.setText(R.id.tv_relation, data.getRelation());
|
||||
holder.setText(R.id.tv_time, data.getTime());
|
||||
|
||||
// TextView textView= holder.itemView.findViewById(R.id.tv_num);
|
||||
// TextView textView2= holder.itemView.findViewById(R.id.tv_room_name);
|
||||
//
|
||||
// textView.setText(data.getUser_list().size()+"人");
|
||||
// textView2.setText(data.getRoom_name());
|
||||
// ImageView iv = holder.itemView.findViewById(R.id.iv_play);
|
||||
// ImageUtils.loadRes(com.qxcm.moduleutil.R.drawable.voice_play, iv);
|
||||
//// }
|
||||
//
|
||||
// // 设置点击事件
|
||||
// holder.itemView.setOnClickListener(v -> {
|
||||
// if (onItemClickListener != null) {
|
||||
// onItemClickListener.onItemClick(holder.itemView, data, position);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId(int viewType) {
|
||||
return R.layout.item_relationship;
|
||||
protected void convert(com.chad.library.adapter.base.BaseViewHolder helper, RelationshipBean item) {
|
||||
if (item.getType() == 1){
|
||||
helper.getView(R.id.ll).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guxi_k);
|
||||
}else if (item.getType() == 2){
|
||||
helper.getView(R.id.ll).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guxi_w);
|
||||
}
|
||||
ImageUtils.loadHeadCC(item.getAvatar1(), helper.getView(R.id.user_nav1));
|
||||
ImageUtils.loadHeadCC(item.getAvatar2(), helper.getView(R.id.user_nav2));
|
||||
helper.setText(R.id.tv_nickname1, item.getNickname1());
|
||||
helper.setText(R.id.tv_nickname2, item.getNickname2());
|
||||
helper.setText(R.id.tv_relation, item.getRelation_name());
|
||||
LogUtils.e("lxj",Long.parseLong(item.getEnd_time())-System.currentTimeMillis());
|
||||
helper.setText(R.id.tv_time, TimeUtils.formatDuration2(Long.parseLong(item.getEnd_time())*1000-System.currentTimeMillis()));
|
||||
if (item.getUser_id1()== SpUtil.getUserId() || item.getUser_id2() == SpUtil.getUserId()){
|
||||
helper.getView(R.id.im_zhid).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.im_shanchu).setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
helper.getView(R.id.im_zhid).setVisibility(View.GONE);
|
||||
helper.getView(R.id.im_shanchu).setVisibility(View.GONE);
|
||||
}
|
||||
helper.getView(R.id.im_shanchu).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (onItemClickListener!= null) {
|
||||
onItemClickListener.onItemClick(view, item, helper.getLayoutPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
helper.getView(R.id.im_zhid).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (onItemClickListener!= null) {
|
||||
onItemClickListener.onItemClick(view, item, helper.getLayoutPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(View view, TopRoom data, int position);
|
||||
void onItemClick(View view, RelationshipBean data, int position);
|
||||
}
|
||||
}
|
||||
@@ -25,12 +25,20 @@ import java.util.List;
|
||||
* @data 2025/6/23
|
||||
* @description: 在线列表适配器
|
||||
*/
|
||||
public class RoomOnlineAdapter extends BaseQuickAdapter<RoomOnlineBean, BaseViewHolder> {
|
||||
|
||||
public RoomOnlineAdapter() {
|
||||
super(R.layout.item_onlie_room);
|
||||
public class RoomOnlineAdapter extends BaseMultiItemQuickAdapter<RoomOnlineBean, BaseViewHolder> {
|
||||
/**
|
||||
* Same as QuickAdapter#QuickAdapter(Context,int) but with
|
||||
* some initialization data.
|
||||
*
|
||||
* @param data A new list is created out of this one to avoid mutable list
|
||||
*/
|
||||
public RoomOnlineAdapter(List<RoomOnlineBean> data) {
|
||||
super(data);
|
||||
addItemType(1, R.layout.item_room_online_text);
|
||||
addItemType(2, R.layout.item_onlie_room);
|
||||
}
|
||||
|
||||
|
||||
// 接口定义
|
||||
public interface OnJoinButtonClickListener {
|
||||
void onJoinButtonClick(RoomOnlineBean item);
|
||||
@@ -46,31 +54,34 @@ public class RoomOnlineAdapter extends BaseQuickAdapter<RoomOnlineBean, BaseView
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RoomOnlineBean item) {
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.like_avatar));
|
||||
helper.setText(R.id.tv_nickname, item.getNickname());
|
||||
ImageView imageView = helper.getView(R.id.im_i);
|
||||
TextView textView = helper.getView(R.id.tv_status);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
if (item.getRole().equals("1")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.fangz);
|
||||
} else if (item.getRole().equals("2")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.gly);
|
||||
} else if (item.getRole().equals("3")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.zc);
|
||||
} else if (item.getRole().equals("4")) {
|
||||
helper.getView(R.id.im_i).setVisibility(GONE);
|
||||
if (item.getItemType() == 1) {
|
||||
helper.setText(R.id.maishang, item.getTypeNames());
|
||||
} else if (item.getItemType() == 2) {
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.like_avatar));
|
||||
helper.setText(R.id.tv_nickname, item.getNickname());
|
||||
ImageView imageView = helper.getView(R.id.im_i);
|
||||
TextView textView = helper.getView(R.id.tv_status);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
if (item.getRole().equals("1")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.fangz);
|
||||
} else if (item.getRole().equals("2")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.gly);
|
||||
} else if (item.getRole().equals("3")) {
|
||||
imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.zc);
|
||||
} else if (item.getRole().equals("4")) {
|
||||
helper.getView(R.id.im_i).setVisibility(GONE);
|
||||
// imageView.setImageResource(com.qxcm.moduleutil.R.mipmap.jb);
|
||||
} else {
|
||||
helper.getView(R.id.im_i).setVisibility(GONE);
|
||||
}
|
||||
} else {
|
||||
helper.getView(R.id.im_i).setVisibility(GONE);
|
||||
}
|
||||
// if (item.getType() == 1){
|
||||
//
|
||||
// }
|
||||
if (item.getType() == 2 && item.getType_pit() == 1){
|
||||
textView.setVisibility(GONE);
|
||||
}else {
|
||||
textView.setVisibility(VISIBLE);
|
||||
}
|
||||
if (item.getType() == 2 && item.getType_pit() == 1) {
|
||||
textView.setVisibility(GONE);
|
||||
} else {
|
||||
textView.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
// else if (item.getType() == 2 && item.getType_pit() == 2){
|
||||
// textView.setVisibility(VISIBLE);
|
||||
@@ -78,44 +89,44 @@ public class RoomOnlineAdapter extends BaseQuickAdapter<RoomOnlineBean, BaseView
|
||||
// textView.setVisibility(GONE);
|
||||
// }
|
||||
|
||||
textView.setText(item.getPit_number() != 0 ? item.getPit_number() + "号麦" : "抱麦");
|
||||
textView.setText(item.getPit_number() != 0 ? (item.getPit_number() == 9 ? "主持" : (item.getPit_number() == 10 ? "嘉宾" : item.getPit_number()+ "号麦")) : "抱麦");
|
||||
|
||||
LinearLayout llContainer = helper.getView(R.id.line);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
LinearLayout llContainer = helper.getView(R.id.line);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
|
||||
helper.getView(R.id.tv_status).setOnClickListener(v -> {
|
||||
if (textView.getText().toString().equals("抱麦")) {
|
||||
if (listener != null) {
|
||||
listener.onJoinButtonClick(item);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
});
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
if (listener != null){
|
||||
listener.onUserInfoClick(item);
|
||||
}
|
||||
|
||||
});
|
||||
helper.getView(R.id.tv_status).setOnClickListener(v -> {
|
||||
if (textView.getText().toString().equals("抱麦")) {
|
||||
if (listener != null) {
|
||||
listener.onJoinButtonClick(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
if (listener != null) {
|
||||
listener.onUserInfoClick(item);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,19 +21,30 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
||||
@Override
|
||||
protected void convert(BaseViewHolder holder, RoomSettingBean item) {
|
||||
|
||||
if (item.getItemType() == RoomSettingBean.ITEM_TYPE_DEFAULT){
|
||||
if (item.getItemType() == RoomSettingBean.ITEM_TYPE_DEFAULT) {
|
||||
holder.setVisible(R.id.tv_title, true);
|
||||
holder.setText(R.id.tv_title, item.getName());
|
||||
}else {
|
||||
holder.setText(R.id.tv_name, item.getName());
|
||||
holder.setImageResource(R.id.iv_icon, getIconResId(item.getType(),item.isStatus()));
|
||||
} else {
|
||||
holder.setText(R.id.tv_name,getName( item.getType(), item.isSelect(),item.getName()));
|
||||
holder.setImageResource(R.id.iv_icon, getIconResId(item.getType(), item.isSelect()));
|
||||
}
|
||||
}
|
||||
|
||||
private String getName(int type, boolean isSelected,String name) {
|
||||
boolean b = isSelected;
|
||||
switch (type) {
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomOrderMic:
|
||||
return b ? "排麦模式" : "自由模式";
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomCloseEffects:
|
||||
return b ? "关闭特效" : "开启特效";
|
||||
default:
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据 type 获取对应的图标资源 ID
|
||||
private int getIconResId(int type,boolean isSelected) {
|
||||
boolean b=isSelected;
|
||||
private int getIconResId(int type, boolean isSelected) {
|
||||
boolean b = isSelected;
|
||||
switch (type) {
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomTypeSing:
|
||||
return com.qxcm.moduleutil.R.mipmap.ic_sing;
|
||||
@@ -51,7 +62,7 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomClearMessage:
|
||||
return com.qxcm.moduleutil.R.mipmap.ic_clear_message;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomOrderMic:
|
||||
return b ? com.qxcm.moduleutil.R.mipmap.ic_order_mic_selected : com.qxcm.moduleutil.R.mipmap.ic_order_mic;
|
||||
return b ? com.qxcm.moduleutil.R.mipmap.ic_order_mic : com.qxcm.moduleutil.R.mipmap.ic_order_mic_selected;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomBgMusic:
|
||||
return com.qxcm.moduleutil.R.mipmap.ic_bg_music;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomBgImage:
|
||||
@@ -68,7 +79,7 @@ public class RoomSettingAdapter extends BaseMultiItemQuickAdapter<RoomSettingBea
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomWelcome:
|
||||
return com.qxcm.moduleutil.R.mipmap.ic_welcome;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomCloseEffects:
|
||||
return b?com.qxcm.moduleutil.R.mipmap.ic_close_effects:com.qxcm.moduleutil.R.mipmap.ic_open_effects;
|
||||
return b ? com.qxcm.moduleutil.R.mipmap.ic_close_effects : com.qxcm.moduleutil.R.mipmap.ic_open_effects;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomReport:
|
||||
return com.qxcm.moduleutil.R.mipmap.ic_report;
|
||||
default:
|
||||
|
||||
@@ -29,7 +29,7 @@ public class DataListContacts {
|
||||
|
||||
void setCharmEmpty( List<CharmRankingResp> list);
|
||||
|
||||
void setWealthEmpty();
|
||||
void setWealthEmpty(List<CharmRankingResp> list);
|
||||
}
|
||||
public interface IRoomDataListPre extends IPresenter {
|
||||
|
||||
@@ -37,6 +37,6 @@ public class DataListContacts {
|
||||
void getCharmListInfo(String roomId,String type, String time_type, String page, String page_limit);
|
||||
|
||||
//定义财富榜数据访问接口
|
||||
void getWealthListInfo(String roomId,int type);
|
||||
void getWealthListInfo(String roomId, String type, String time_type, String page, String page_limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class RoomAuctionContacts {
|
||||
void roomAuction(String roomId, String userId,String giftId, String relation_id, String auction_type, String time_day);
|
||||
|
||||
void auctionDelay(String auctionId);
|
||||
void auctionEnd(String auctionId);
|
||||
void auctionEnd(String auctionId,String roomId);
|
||||
|
||||
void auctionMode(String roomId,String labelId);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.app.Activity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnlineBean;
|
||||
@@ -14,17 +15,24 @@ import java.util.List;
|
||||
public class RoomContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void roomInfo(RoomInfoResp resp);
|
||||
|
||||
void showPasswordDialog();
|
||||
|
||||
void enterFail();
|
||||
|
||||
void getRoomOnline(RoomOnline onlineBean);
|
||||
|
||||
void applyPit();
|
||||
|
||||
void downPit();
|
||||
|
||||
void applySong();
|
||||
|
||||
void agreeSong();
|
||||
void postRoomInfo(RoomInfoResp resp);
|
||||
void getCharmRank(List<RoomCharmRankBean> list);
|
||||
|
||||
void postRoomInfo(RoomInfoResp resp);
|
||||
|
||||
void getCharmRank(List<RoomCharmRankBean> list);
|
||||
|
||||
void changeSong();
|
||||
|
||||
@@ -32,13 +40,19 @@ public class RoomContacts {
|
||||
|
||||
void quitRoom();
|
||||
|
||||
void userGuanzSuccess(String s);
|
||||
void acceptPk();
|
||||
void userGuanzSuccess(String s);
|
||||
|
||||
void acceptPk();
|
||||
|
||||
void clearUserCharm();
|
||||
|
||||
void userOnlineStatus(List<UserOnlineStatusBean> list);
|
||||
}
|
||||
|
||||
public interface IRoomPre extends IPresenter {
|
||||
void getRoomIn(String roomId, String password);//加入房间
|
||||
|
||||
void getRoomOnline(String roomId,String page, String page_limit);
|
||||
void getRoomOnline(String roomId, String page, String page_limit);
|
||||
|
||||
void applyPit(String roomId, String pitNumber);
|
||||
|
||||
@@ -46,7 +60,7 @@ public class RoomContacts {
|
||||
|
||||
void applySong(String roomId);
|
||||
|
||||
void agreeSong(String roomId,String type);//申请点唱模式 type:1同意 2拒绝
|
||||
void agreeSong(String roomId, String type);//申请点唱模式 type:1同意 2拒绝
|
||||
|
||||
void endSong(String roomId);
|
||||
|
||||
@@ -54,14 +68,18 @@ public class RoomContacts {
|
||||
|
||||
void getCharmRank(String roomId);
|
||||
|
||||
void changeSong(String roomId,String now_did);
|
||||
void changeSong(String roomId, String now_did);
|
||||
|
||||
void hostUserPit(String roomId,String pitNumber,String userId,String type);
|
||||
void hostUserPit(String roomId, String pitNumber, String userId, String type);
|
||||
|
||||
void quitRoom(String roomId,String userId);
|
||||
void quitRoom(String roomId, String userId);
|
||||
|
||||
void userGuanz(String userId,String type);
|
||||
void userGuanz(String userId, String type);
|
||||
|
||||
void acceptPk(String pkId,String type);
|
||||
void acceptPk(String pkId, String type);
|
||||
|
||||
void clearUserCharm(String roomId, String userId);//清除魅力值
|
||||
|
||||
void userOnlineStatus(String userId, String roomid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ public class RoomPkContacts {
|
||||
|
||||
void sendPk();
|
||||
void refusePk();
|
||||
|
||||
void finishLoading();
|
||||
}
|
||||
public interface IRoomPre extends IPresenter {
|
||||
void searchPkRoom(String roomId,String page,String limit);
|
||||
|
||||
@@ -4,8 +4,12 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.RelationCardBean;
|
||||
import com.qxcm.moduleutil.bean.RelationshipBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RoomUserContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void getRoomUserInfo(UserInfo userInfo);
|
||||
@@ -18,6 +22,14 @@ public class RoomUserContacts {
|
||||
void addBlackList();
|
||||
void userGuanzSuccess(String s);
|
||||
void hostUserPit();
|
||||
void giveCoin();
|
||||
void relationCard(RelationCardBean list);
|
||||
|
||||
void topRelationCard(String s);
|
||||
void deleteRelationCard(String s);
|
||||
}
|
||||
|
||||
public interface ViewGx extends IView<Activity> {
|
||||
}
|
||||
|
||||
public interface IEmotionRoomPre extends IPresenter {
|
||||
@@ -36,7 +48,11 @@ public class RoomUserContacts {
|
||||
|
||||
void hostUserPit(String roomId,String pitNumber,String userId,String type);
|
||||
|
||||
void giveCoin(String user_id,String coin);
|
||||
|
||||
void relationCard(String user_id);
|
||||
|
||||
void topRelationCard(String id);
|
||||
void deleteRelationCard(String id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SingSongContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void applyPit();
|
||||
@@ -17,6 +20,8 @@ public class SingSongContacts {
|
||||
void postRoomInfoUp(RoomInfoResp resp);
|
||||
|
||||
void endPk();
|
||||
|
||||
void userOnlineStatus(List<UserOnlineStatusBean> list);
|
||||
}
|
||||
|
||||
public interface IEmotionRoomPre extends IPresenter {
|
||||
@@ -29,5 +34,6 @@ public class SingSongContacts {
|
||||
void postRoomInfo(String roomId,String number,int type);
|
||||
|
||||
void endPk(String pk_id,String type,String user_id);
|
||||
void userOnlineStatus(String userId, String roomid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.example.moduleroom.contacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.GiftUserWallBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class UserGiftWallConacts {
|
||||
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
void setGiftWall(GiftUserWallBean data);
|
||||
}
|
||||
|
||||
|
||||
public interface IUserGiftWallPre extends IPresenter {
|
||||
void giftWall(String userId);
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
args.putString("userId", userId);
|
||||
args.putString("type", type);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "PublishCommentDialogFragment");
|
||||
dialogFragment.show(fragmentManager, "CardRelationshipFragment");
|
||||
}
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
@@ -239,4 +239,14 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
list.add(new RoomAutionTimeBean(30));
|
||||
return list;
|
||||
}
|
||||
|
||||
public void dismissDialog() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,14 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.Animation;
|
||||
@@ -16,6 +19,8 @@ import android.view.animation.AnimationUtils;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
@@ -32,11 +37,12 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
RoomAuction.AuctionListBean recipient;
|
||||
RoomAuction.AuctionUserBean auction_user;
|
||||
private OnDialogActionListener listener;
|
||||
GifAvatarOvalView avatar1;
|
||||
GifAvatarOvalView avatar2;
|
||||
private TextView tv_tname;
|
||||
private TextView tv_name1;
|
||||
private TextView tv_name2;
|
||||
GifAvatarOvalView avatar1,za_avatar1;
|
||||
GifAvatarOvalView avatar2,za_avatar2;
|
||||
private TextView tv_tname,tv_za_tname;
|
||||
private TextView tv_name1,tv_za_name1;
|
||||
private TextView tv_name2,tv_za_name2;
|
||||
ConstraintLayout constraintLayout_qm, constraintLayout2_za;
|
||||
|
||||
public interface OnDialogActionListener {
|
||||
void onKnowClicked();
|
||||
@@ -106,15 +112,43 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
tv_name2= dialog.findViewById(R.id.tv_name2);
|
||||
tv_tname= dialog.findViewById(R.id.tv_tname);
|
||||
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(),avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(),avatar2);
|
||||
tv_name1.setText(recipient.getNickname());
|
||||
tv_name2.setText(auction_user.getNickname());
|
||||
tv_tname.setText(auction_user.getRelation_name()+"关系竞拍成功");
|
||||
za_avatar1= dialog.findViewById(R.id.za_avatar1);
|
||||
za_avatar2= dialog.findViewById(R.id.za_avatar2);
|
||||
tv_za_name1= dialog.findViewById(R.id.tv_za_name1);
|
||||
tv_za_name2= dialog.findViewById(R.id.tv_za_name2);
|
||||
tv_za_tname= dialog.findViewById(R.id.tv_tname_za);
|
||||
|
||||
constraintLayout_qm= dialog.findViewById(R.id.cl_container);
|
||||
constraintLayout2_za= dialog.findViewById(R.id.cl_container_za);
|
||||
if (auction_user.getAuction_type().equals("2")){
|
||||
constraintLayout_qm.setVisibility(View.VISIBLE);
|
||||
constraintLayout2_za.setVisibility(View.GONE);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(),avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(),avatar2);
|
||||
tv_name1.setText(recipient.getNickname());
|
||||
tv_name2.setText(auction_user.getNickname());
|
||||
tv_tname.setText(auction_user.getRelation_name()+"关系竞拍成功");
|
||||
setTextViewGradient(tv_tname, ContextCompat.getColor(getContext(), com.qxcm.moduleutil.R.color.color_FFFFF0F0), ContextCompat.getColor(getContext(), com.qxcm.moduleutil.R.color.color_FFA4C8));
|
||||
}else {
|
||||
constraintLayout_qm.setVisibility(View.GONE);
|
||||
constraintLayout2_za.setVisibility(View.VISIBLE);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(),za_avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(),za_avatar2);
|
||||
tv_za_name1.setText(recipient.getNickname());
|
||||
tv_za_name2.setText(auction_user.getNickname());
|
||||
tv_za_tname.setText(auction_user.getRelation_name()+"关系竞拍成功");
|
||||
}
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private void setTextViewGradient(TextView textView, int startColor, int endColor) {
|
||||
Shader shader = new LinearGradient(
|
||||
0, 0, textView.getPaint().getTextSize() * textView.length(), 0,
|
||||
new int[]{startColor, endColor},
|
||||
null,
|
||||
Shader.TileMode.CLAMP);
|
||||
textView.getPaint().setShader(shader);
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@@ -120,6 +120,7 @@ public class PkTimeDialogFragment extends BaseMvpDialogFragment<PkTimePresenter,
|
||||
|
||||
public static List<RoomAutionTimeBean> getDefaultTimeOptions() {
|
||||
List<RoomAutionTimeBean> list = new ArrayList<>();
|
||||
list.add(new RoomAutionTimeBean(1));
|
||||
list.add(new RoomAutionTimeBean(5));
|
||||
list.add(new RoomAutionTimeBean(10));
|
||||
list.add(new RoomAutionTimeBean(15));
|
||||
|
||||
@@ -59,15 +59,17 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
private int page;
|
||||
private static String roomId;
|
||||
private RoomInfoResp roomInfoResp;
|
||||
private int type;//1:点唱,2:背景音乐
|
||||
@Override
|
||||
protected RequestPresenter bindPresenter() {
|
||||
return new RequestPresenter(this, getActivity());
|
||||
}
|
||||
public static void show(String id,RoomInfoResp roomInfoResp, FragmentManager fragmentManager) {
|
||||
public static void show(String id,RoomInfoResp roomInfoResp, int type,FragmentManager fragmentManager) {
|
||||
RequestDialogFragment dialogFragment = new RequestDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", id); // 可选:传递参数
|
||||
args.putSerializable("roomInfo", roomInfoResp);
|
||||
args.putInt("type", type);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RequestDialogFragment");
|
||||
}
|
||||
@@ -77,6 +79,7 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
super.onAttach(context);
|
||||
roomId=getArguments().getString("roomId");
|
||||
roomInfoResp= (RoomInfoResp) getArguments().getSerializable("roomInfo");
|
||||
type=getArguments().getInt("type");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -113,7 +116,7 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
String[] title = new String[]{"点歌", "已点"};
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
// 创建子 Fragment 并设置回调监听器
|
||||
RequestFragment dataFragment = RequestFragment.newInstance(roomId, RequestFragment.TYPE_DATA);
|
||||
RequestFragment dataFragment = RequestFragment.newInstance(roomId, RequestFragment.TYPE_DATA,type);
|
||||
dataFragment.setOnRequestFragmentListener(new RequestFragment.OnRequestFragmentListener() {
|
||||
@Override
|
||||
public void onCloseDialog(Music musicSongBean) {
|
||||
@@ -127,7 +130,7 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
|
||||
fragments.add(dataFragment);
|
||||
fragments.add(weekFragment);
|
||||
mBinding.vpRequest.setAdapter(new MyFragmentPagerAdapter(getActivity(), title,roomId,roomInfoResp));
|
||||
mBinding.vpRequest.setAdapter(new MyFragmentPagerAdapter(getActivity(), title,roomId,roomInfoResp,type));
|
||||
|
||||
// 绑定 TabLayout
|
||||
new TabLayoutMediator(mBinding.slidingTabLayout, mBinding.vpRequest,
|
||||
@@ -169,12 +172,14 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
private String[] list;
|
||||
private String roomId;
|
||||
private RoomInfoResp roomInfoResp;
|
||||
private int type;
|
||||
|
||||
public MyFragmentPagerAdapter(@NonNull FragmentActivity fragmentActivity, String[] list,String roomId,RoomInfoResp roomInfoResp) {
|
||||
public MyFragmentPagerAdapter(@NonNull FragmentActivity fragmentActivity, String[] list,String roomId,RoomInfoResp roomInfoResp,int type) {
|
||||
super(fragmentActivity);
|
||||
this.list = list;
|
||||
this.roomId=roomId;
|
||||
this.roomInfoResp=roomInfoResp;
|
||||
this.type=type;
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +193,7 @@ public class RequestDialogFragment extends BaseMvpDialogFragment<RequestPresente
|
||||
if (position == 1)
|
||||
return MusicSongListFragment.newInstance(roomId,roomInfoResp, RequestFragment.TYPE_WEEK);
|
||||
else {
|
||||
return RequestFragment.newInstance(roomId, RequestFragment.TYPE_DATA);
|
||||
return RequestFragment.newInstance(roomId, RequestFragment.TYPE_DATA,type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
@@ -25,6 +26,7 @@ import com.qxcm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.GiftLabelBean;
|
||||
import com.qxcm.moduleutil.bean.GiftNumBean;
|
||||
import com.qxcm.moduleutil.bean.GiftPackBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
@@ -38,6 +40,7 @@ import com.qxcm.moduleutil.event.GiftUserRefreshEvent;
|
||||
import com.qxcm.moduleutil.event.RoomGiftGiveEvent;
|
||||
import com.qxcm.moduleutil.presenter.RewardGiftContacts;
|
||||
import com.qxcm.moduleutil.presenter.RewardGiftPresenter;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.dialog.KeyboardPopupWindow;
|
||||
@@ -48,8 +51,10 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -63,6 +68,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
private KeyboardPopupWindow mKeyboardPopupWindow;
|
||||
private List<GiftNumBean> mGiftNumList;
|
||||
private RoonGiftModel roonGiftModel = null;
|
||||
private GiftPackBean giftModel = null;
|
||||
private RoomInfoResp roomInfoResp;
|
||||
private String label_id;
|
||||
List<RewardUserBean> rewardUserBeanList;
|
||||
@@ -72,6 +78,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
private boolean all = false;
|
||||
private String roomId;
|
||||
private final List<String> oldSelectedIds = new LinkedList<>();
|
||||
private int jingp;//1:是点击的竞拍,2:是点击的送礼物
|
||||
|
||||
|
||||
@Override
|
||||
@@ -79,12 +86,13 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
return new RewardGiftPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
public static void show(RoomInfoResp roomInfoResp, UserInfo userInfo, String roomId, FragmentManager fragmentManager) {
|
||||
public static void show(RoomInfoResp roomInfoResp, UserInfo userInfo, String roomId,int jingp, FragmentManager fragmentManager) {
|
||||
RoomGiftDialogFragment dialogFragment = new RoomGiftDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("roomInfoResp", roomInfoResp);
|
||||
args.putSerializable("userInfo", userInfo);
|
||||
args.putString("roomId", roomId);
|
||||
args.putInt("jingp",jingp);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RewardGiftDialogFragment");
|
||||
}
|
||||
@@ -92,9 +100,11 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
EventBus.getDefault().register(this);
|
||||
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||
userInfo = (UserInfo) getArguments().getSerializable("userInfo");
|
||||
roomId = getArguments().getString("roomId");
|
||||
jingp = getArguments().getInt("jingp");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,6 +113,12 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
// MvpPre.getRewardList("1", 1, 10);
|
||||
@@ -166,7 +182,39 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
private List<RewardUserBean> getSortedRewardUserList(List<RoomPitBean> pitList, String... priorityPits) {
|
||||
List<RewardUserBean> result = new ArrayList<>();
|
||||
List<RoomPitBean> pitList2 = new ArrayList<>();
|
||||
List<RoomPitBean> pitList3 = new ArrayList<>();
|
||||
List<String> added = new ArrayList<>();
|
||||
if (roomInfoResp.getSong_pit_list()!=null && roomInfoResp.getSong_pit_list().size()>0){
|
||||
pitList2.addAll(roomInfoResp.getSong_pit_list());
|
||||
// 使用 HashSet 进行去重
|
||||
Set<RoomPitBean> uniquePitSet = new HashSet<>(pitList);
|
||||
uniquePitSet.addAll(pitList2);
|
||||
// 将去重后的集合转换回 List
|
||||
pitList.clear();
|
||||
pitList.addAll(uniquePitSet);
|
||||
}
|
||||
|
||||
if (roomInfoResp.getRoom_auction()!=null){
|
||||
if (roomInfoResp.getRoom_auction().getAuction_list()!=null && roomInfoResp.getRoom_auction().getAuction_list().size()>0){
|
||||
for (int i=0;i<roomInfoResp.getRoom_auction().getAuction_list().size();i++){
|
||||
RoomAuction.AuctionListBean auctionListBean = roomInfoResp.getRoom_auction().getAuction_list().get(i);
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setUser_id(auctionListBean.getUser_id());
|
||||
pitBean.setNickname(auctionListBean.getNickname());
|
||||
pitBean.setAvatar(auctionListBean.getAvatar());
|
||||
pitBean.setCharm(auctionListBean.getCharm());
|
||||
pitBean.setPit_number("1111");
|
||||
pitList3.add(pitBean);
|
||||
}
|
||||
// 使用 HashSet 进行去重
|
||||
Set<RoomPitBean> uniquePitSet = new HashSet<>(pitList);
|
||||
uniquePitSet.addAll(pitList3);
|
||||
// 将去重后的集合转换回 List
|
||||
pitList.clear();
|
||||
pitList.addAll(uniquePitSet);
|
||||
}
|
||||
}
|
||||
|
||||
// 优先添加指定麦位
|
||||
for (String targetPit : priorityPits) {
|
||||
@@ -192,7 +240,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
String pitNumber = bean.getPit_number();
|
||||
if (!added.contains(pitNumber) &&
|
||||
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
||||
!bean.getUser_id().equals(SpUtil.getUserId())) {
|
||||
!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||
rewardUserBean.setUser_id(bean.getUser_id());
|
||||
@@ -259,7 +307,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
giveGift(giftNumber);
|
||||
} else if (view1.getId() == R.id.cz) {
|
||||
RechargeDialogFragment.show(roomId, getActivity().getSupportFragmentManager());
|
||||
RechargeDialogFragment.show(roomId, null,getActivity().getSupportFragmentManager());
|
||||
} else if (view1.getId() == R.id.tv_all_wheat) {//全麦
|
||||
if (all) {
|
||||
gifyuseradapter.allElection(false);
|
||||
@@ -285,20 +333,45 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void userRefresh(GiftUserRefreshEvent event) {
|
||||
|
||||
if (event.gift.getRule() == null) {
|
||||
mBinding.llGiftRule.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.llGiftRule.setVisibility(View.VISIBLE);
|
||||
setGiftDetail(event.gift);
|
||||
}
|
||||
// if (event.gift.isManghe()){
|
||||
// mBinding.llGiftRule.setVisibility(View.VISIBLE);
|
||||
// setGiftDetail(event.gift);
|
||||
// }else {
|
||||
// mBinding.llGiftRule.setVisibility(View.GONE);
|
||||
// }
|
||||
roonGiftModel = event.gift;
|
||||
}
|
||||
|
||||
public void setGiftDetail(RoonGiftModel giftDetailResp) {
|
||||
if (giftDetailResp == null) {
|
||||
return;
|
||||
}
|
||||
mBinding.tvTitle.setText(giftDetailResp.getGift_bag_name());
|
||||
mBinding.tvIntroduce.setText(giftDetailResp.getRule());
|
||||
mBinding.ivWf.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", giftDetailResp.getRule_url()).withString("title", "盲盒规则").navigation();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private int getSelectedGift() {
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
// if (currentItem < 1) { //比2小是才是礼物
|
||||
GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
roonGiftModel = fragment.getGiftList();
|
||||
// }
|
||||
// else {
|
||||
// GiftFragment fragment = (GiftFragment) fragmentList.get(currentItem);
|
||||
// giftModel = fragment.getmData();
|
||||
// }
|
||||
if (currentItem < 1) { //比2小是才是礼物
|
||||
GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
roonGiftModel = fragment.getGiftList();
|
||||
} else {
|
||||
GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
giftModel = fragment.mGiftList();
|
||||
}
|
||||
return currentItem;
|
||||
}
|
||||
|
||||
@@ -308,7 +381,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
String userId = gifyuseradapter.getUserIdToString();
|
||||
String pit = gifyuseradapter.getUserPitToString();
|
||||
if (currentItem < 1) {
|
||||
if (roonGiftModel == null) {
|
||||
if (giftModel == null) {
|
||||
ToastUtils.show("请选择礼物");
|
||||
return;
|
||||
}
|
||||
@@ -347,24 +420,36 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
}
|
||||
|
||||
if (currentItem == 0) {
|
||||
if (currentItem != 0) {
|
||||
//礼物打赏
|
||||
giftNumber = num;
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel);
|
||||
if (userInfo!=null) {
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getPit_number() != null && userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty()) {
|
||||
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 {
|
||||
} else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
}
|
||||
} else {
|
||||
if (all) {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", null);
|
||||
} else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
}
|
||||
}
|
||||
else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
}
|
||||
} else if (currentItem == 0) {
|
||||
// if (all) {
|
||||
// MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", null);
|
||||
// } else {
|
||||
// MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit);
|
||||
// }
|
||||
giftNumber = num;
|
||||
// roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 1, giftModel, null);
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit);
|
||||
} else {
|
||||
//背包礼物打赏
|
||||
// giftNumber = num;
|
||||
@@ -394,9 +479,13 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
|
||||
@Override
|
||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||
GiftLabelBean giftLabelBean = new GiftLabelBean();
|
||||
giftLabelBean.setId("0");
|
||||
giftLabelBean.setName("背包");
|
||||
giftLabelBeans.add(0, giftLabelBean);
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -407,7 +496,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
@Override
|
||||
public void giveGift() {
|
||||
// dismiss();
|
||||
if (roomGiftGiveEvent != null){
|
||||
if (roomGiftGiveEvent != null) {
|
||||
EventBus.getDefault().post(roomGiftGiveEvent);
|
||||
roomGiftGiveEvent = null;
|
||||
dismiss();
|
||||
@@ -431,6 +520,11 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giftPack(List<GiftPackBean> giftPackBean) {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<GiftLabelBean> list;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class RoomHostAddFragment extends BaseMvpDialogFragment<RoomHostPresenter
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, RoomSearchResp item) {
|
||||
helper.setText(R.id.tv_name, item.getName());
|
||||
ImageUtils.loadHeadCC(item.getPictrue(), helper.getView(R.id.image));
|
||||
ImageUtils.loadHeadCC(item.getPicture(), helper.getView(R.id.image));
|
||||
helper.setText(R.id.tv_id, item.getCode());
|
||||
// if (item.getSex().equals("1")){
|
||||
// helper.setBackgroundRes(R.id.tv_gender, com.qxcm.moduleutil.R.mipmap.boyb);
|
||||
|
||||
@@ -13,7 +13,11 @@ import com.example.moduleroom.databinding.RoomHostIncomeDialogBinding;
|
||||
import com.qxcm.moduleutil.widget.dialog.BaseDialog;
|
||||
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @Author
|
||||
* @Time 2025/8/1 22:30
|
||||
* @Description 设置主持人收益比例
|
||||
*/
|
||||
@Setter
|
||||
public class RoomHostIncomeDialog extends BaseDialog<RoomHostIncomeDialogBinding> {
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.databinding.RoomHostIncomeDialogBinding;
|
||||
import com.example.moduleroom.databinding.RoomHostZbDialogBinding;
|
||||
import com.qxcm.moduleutil.widget.dialog.BaseDialog;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025年8月1日22:30:48$ $
|
||||
* @Description 转币$
|
||||
*/
|
||||
public class RoomHostZBDialog extends BaseDialog<RoomHostZbDialogBinding> {
|
||||
|
||||
|
||||
public RoomHostZBDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public void setListener(RoomHostIncomeDialog.OnConfirmClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.room_host_zb_dialog;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
getWindow().setLayout((int) (ScreenUtils.getScreenWidth() / 375.0 * 341), RadioGroup.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.btnAction.setOnClickListener(this::onViewClicked);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
|
||||
public RoomHostIncomeDialog.OnConfirmClickListener listener;
|
||||
|
||||
public void onViewClicked(View view) {
|
||||
if (listener != null) {
|
||||
if (mBinding.edRoomName.getText().toString().trim().isEmpty()){
|
||||
ToastUtils.showShort("请输入需要转币的金额");
|
||||
}else {
|
||||
listener.onConfirm(mBinding.edRoomName.getText().toString().trim());
|
||||
}
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
public interface OnConfirmClickListener {
|
||||
void onConfirm(String proportion);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.AdapterView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.databinding.RoomDialogMessageListBinding;
|
||||
import com.qxcm.moduleutil.activity.news.NewsPresenter;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||
import com.tencent.qcloud.tuikit.tuiconversation.classicui.page.TUIConversationFragment;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author
|
||||
* @Time 2025/7/28 16:11
|
||||
* @Description 房间里面点击消息列表弹出的对话框
|
||||
*/
|
||||
public class RoomMessageDialogFragment extends BaseMvpDialogFragment<NewsPresenter, RoomDialogMessageListBinding> {
|
||||
|
||||
private static final String TAG = "BaseDialogFragment";
|
||||
|
||||
public static void show(FragmentManager fragmentManager) {
|
||||
RoomMessageDialogFragment dialogFragment = new RoomMessageDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RoomOnlineDialogFragment");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.dimAmount = 0.4f;
|
||||
window.setAttributes(lp);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
// 添加 tuiconversation 组件提供的经典版会话界面
|
||||
fragments.add(new TUIConversationFragment());
|
||||
|
||||
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(fragments, getChildFragmentManager()));
|
||||
mBinding.viewPager.setCurrentItem(0, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
Log.d(TAG, "(Start)启动了===========================RoomMessageDialogFragment");
|
||||
return R.layout.room_dialog_message_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NewsPresenter bindPresenter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
|
||||
public void onViewClicked(View view) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,22 +25,27 @@ import com.qxcm.moduleutil.adapter.LikeListAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnlineBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUserBean;
|
||||
import com.qxcm.moduleutil.databinding.FragmentCommentDialogBinding;
|
||||
import com.qxcm.moduleutil.presenter.CommentContacts;
|
||||
import com.qxcm.moduleutil.presenter.CommentPresenter;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.dialog.CommentDialogFragment;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description: 在线列表弹框
|
||||
* @author qx
|
||||
* @data 2025/6/10
|
||||
* @description: 在线列表弹框
|
||||
*/
|
||||
public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresenter, FragmentRoomOnlineDialogBinding> implements
|
||||
RoomContacts.View {
|
||||
@@ -49,22 +54,30 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
private RoomOnlineAdapter roomOnlineAdapter2;
|
||||
private String roomId;
|
||||
private String pit_number;
|
||||
private RoomUserBean hostUser;
|
||||
protected RoomInfoResp roomInfoResp;
|
||||
|
||||
@Override
|
||||
protected RoomPresenter bindPresenter() {
|
||||
return new RoomPresenter(this, getActivity());
|
||||
}
|
||||
public static void show(String id,String pit_number, FragmentManager fragmentManager) {
|
||||
|
||||
public static void show(String id, String pit_number, RoomUserBean hostUser, RoomInfoResp roomInfoResp, FragmentManager fragmentManager) {
|
||||
RoomOnlineDialogFragment dialogFragment = new RoomOnlineDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", id); // 可选:传递参数
|
||||
args.putString("pit_number", pit_number);
|
||||
args.putSerializable("hostUser", hostUser); // 可选:传递参数
|
||||
args.putSerializable("roomInfoResp", roomInfoResp);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RoomOnlineDialogFragment");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), "1", "10");
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), "1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
@@ -72,7 +85,8 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);
|
||||
;
|
||||
// int heightInPx = (int) (heightInDp * getResources().getDisplayMetrics().density);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, heightInDp);
|
||||
|
||||
@@ -84,8 +98,10 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
roomId=getArguments().getString("roomId");
|
||||
pit_number=getArguments().getString("pit_number");
|
||||
roomId = getArguments().getString("roomId");
|
||||
pit_number = getArguments().getString("pit_number");
|
||||
hostUser = (RoomUserBean) getArguments().getSerializable("hostUser");
|
||||
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,72 +111,91 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), page+"", "10");
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), "1", "10");
|
||||
MvpPre.getRoomOnline(getArguments().getString("roomId"), "1", "10");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
mBinding.rvComment.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
roomOnlineAdapter = new RoomOnlineAdapter();
|
||||
roomOnlineAdapter = new RoomOnlineAdapter(new ArrayList<RoomOnlineBean>());
|
||||
mBinding.rvComment.setAdapter(roomOnlineAdapter);
|
||||
mBinding.rvComment2.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
roomOnlineAdapter2 = new RoomOnlineAdapter();
|
||||
mBinding.rvComment2.setAdapter(roomOnlineAdapter2);
|
||||
// mBinding.rvComment2.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
// roomOnlineAdapter2 = new RoomOnlineAdapter();
|
||||
// mBinding.rvComment2.setAdapter(roomOnlineAdapter2);
|
||||
|
||||
|
||||
roomOnlineAdapter.setListener(new RoomOnlineAdapter.OnJoinButtonClickListener() {
|
||||
@Override
|
||||
public void onJoinButtonClick(RoomOnlineBean item) {
|
||||
MvpPre.hostUserPit(roomId,pit_number,item.getUser_id()+"","1");
|
||||
MvpPre.hostUserPit(roomId, pit_number, item.getUser_id() + "", "1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserInfoClick(RoomOnlineBean item) {
|
||||
RoomUserInfoFragment.show(roomId, item.getUser_id()+"",pit_number,getHostUser(item),false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomId, item.getUser_id() + "", pit_number, getHostUser(hostUser), false, 4, isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
|
||||
roomOnlineAdapter2.setListener(new RoomOnlineAdapter.OnJoinButtonClickListener() {
|
||||
@Override
|
||||
public void onJoinButtonClick(RoomOnlineBean item) {
|
||||
MvpPre.hostUserPit(roomId,pit_number,item.getUser_id()+"","1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserInfoClick(RoomOnlineBean item) {
|
||||
RoomUserInfoFragment.show(roomId, item.getUser_id()+"",pit_number,0,false, getChildFragmentManager());
|
||||
|
||||
}
|
||||
});
|
||||
// roomOnlineAdapter2.setListener(new RoomOnlineAdapter.OnJoinButtonClickListener() {
|
||||
// @Override
|
||||
// public void onJoinButtonClick(RoomOnlineBean item) {
|
||||
// MvpPre.hostUserPit(roomId, pit_number, item.getUser_id() + "", "1");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onUserInfoClick(RoomOnlineBean item) {
|
||||
// RoomUserInfoFragment.show(roomId, item.getUser_id() + "", pit_number, getHostUser(hostUser), false, 4, isNumberWhether(), getChildFragmentManager());
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private int getHostUser(RoomOnlineBean item){
|
||||
if (item.getPit_number()==9){
|
||||
if (item.getRole().equals("1")){
|
||||
return 1;
|
||||
}else if (item.getRole().equals("2")){
|
||||
return 2;
|
||||
}else {
|
||||
return 3;
|
||||
}
|
||||
|
||||
}
|
||||
private int isNumberWhether() {
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
if (roomInfoResp.getRoom_info().getPit_list().get(i).getPit_number().equals("9") && roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id() != null &&
|
||||
!roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id().equals("0") && !roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id().isEmpty())
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getHostUser(RoomUserBean item) {
|
||||
if (item.getPit_number() == 9) {
|
||||
if (item.getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
} else if (item.getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (item.getIs_host() == 1) {
|
||||
return 3;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (item.getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
} else if (item.getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (item.getIs_host() == 1) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_room_online_dialog;
|
||||
@@ -184,29 +219,44 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
|
||||
@Override
|
||||
public void getRoomOnline(RoomOnline onlineBean) {
|
||||
List<RoomOnlineBean> roomOnlineBeanList=new ArrayList<>();
|
||||
int type_pit;
|
||||
if (pit_number.isEmpty()){
|
||||
type_pit=1;
|
||||
}else {
|
||||
type_pit=2;
|
||||
if (pit_number.isEmpty()) {
|
||||
type_pit = 1;
|
||||
} else {
|
||||
type_pit = 2;
|
||||
}
|
||||
if (onlineBean.getOn_pit()!=null && onlineBean.getOn_pit().size()>0){
|
||||
for (RoomOnlineBean roomOnlineBean : onlineBean.getOn_pit()){
|
||||
roomOnlineBean.setType(1);
|
||||
roomOnlineBean.setType_pit(0);
|
||||
if (onlineBean.getOn_pit() != null && onlineBean.getOn_pit().size() > 0) {
|
||||
RoomOnlineBean roomOnlineBean = new RoomOnlineBean();
|
||||
roomOnlineBean.setItemViewType(1);
|
||||
roomOnlineBean.setTypeNames("麦上用户");
|
||||
roomOnlineBeanList.add(roomOnlineBean);
|
||||
for (RoomOnlineBean roomOnlineBean1 : onlineBean.getOn_pit()) {
|
||||
roomOnlineBean1.setType(1);
|
||||
roomOnlineBean1.setType_pit(0);
|
||||
roomOnlineBean1.setItemViewType(2);
|
||||
roomOnlineBeanList.add(roomOnlineBean1);
|
||||
}
|
||||
roomOnlineAdapter.setNewData(onlineBean.getOn_pit());
|
||||
}
|
||||
if (onlineBean.getOff_pit()!=null && onlineBean.getOff_pit().size()>0){
|
||||
for (RoomOnlineBean roomOnlineBean : onlineBean.getOff_pit()){
|
||||
roomOnlineBean.setType(2);
|
||||
roomOnlineBean.setType_pit(type_pit);
|
||||
}
|
||||
roomOnlineAdapter2.setNewData(onlineBean.getOff_pit());
|
||||
}
|
||||
int total = onlineBean.getOn_pit().size()+onlineBean.getOff_pit().size();
|
||||
|
||||
mBinding.tvNum.setText("在线用户("+total+")人");
|
||||
// roomOnlineAdapter.setNewData(onlineBean.getOn_pit());
|
||||
}
|
||||
if (onlineBean.getOff_pit() != null && onlineBean.getOff_pit().size() > 0) {
|
||||
RoomOnlineBean roomOnlineBean = new RoomOnlineBean();
|
||||
roomOnlineBean.setItemViewType(1);
|
||||
roomOnlineBean.setTypeNames("麦下用户");
|
||||
roomOnlineBeanList.add(roomOnlineBean);
|
||||
for (RoomOnlineBean roomOnlineBean2 : onlineBean.getOff_pit()) {
|
||||
roomOnlineBean2.setType(2);
|
||||
roomOnlineBean2.setType_pit(type_pit);
|
||||
roomOnlineBean2.setItemViewType(2);
|
||||
roomOnlineBeanList.add(roomOnlineBean2);
|
||||
}
|
||||
// roomOnlineAdapter2.setNewData(onlineBean.getOff_pit());
|
||||
}
|
||||
roomOnlineAdapter.setNewData(roomOnlineBeanList);
|
||||
int total = onlineBean.getOn_pit().size() + onlineBean.getOff_pit().size();
|
||||
|
||||
mBinding.tvNum.setText("在线用户(" + total + ")人");
|
||||
}
|
||||
|
||||
// @Override
|
||||
@@ -269,4 +319,14 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
public void acceptPk() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUserCharm() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,4 +224,10 @@ public class RoomPkDialogFragment extends BaseMvpDialogFragment<RoomPkPresenter,
|
||||
public void refusePk() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishLoading() {
|
||||
mBinding.srl.finishRefresh();
|
||||
mBinding.srl.finishLoadMore();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.adapter.RoomSettingAdapter;
|
||||
@@ -45,11 +46,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/17
|
||||
*@description: 房间设置弹框
|
||||
* @author qx
|
||||
* @data 2025/6/17
|
||||
* @description: 房间设置弹框
|
||||
*/
|
||||
public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresenter, DialogRoomSettingFragmentBinding> implements RoomSettingContacts.View{
|
||||
public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresenter, DialogRoomSettingFragmentBinding> implements RoomSettingContacts.View {
|
||||
private String userId;
|
||||
private String roomId;
|
||||
RoomSettingAdapter adapter;
|
||||
@@ -58,6 +59,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
private int read;
|
||||
private boolean isSelected;
|
||||
private boolean effectOn = false;//开启/关闭特效
|
||||
|
||||
@Override
|
||||
protected RoomSettingPresenter bindPresenter() {
|
||||
return new RoomSettingPresenter(this, getActivity());
|
||||
@@ -76,20 +78,21 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
super.onAttach(context);
|
||||
// roomId=getArguments().getString("roomId");
|
||||
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||
roomId= roomInfoResp.getRoom_info().getRoom_id();
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner()!=0){
|
||||
read=1;
|
||||
}else if (roomInfoResp.getUser_info().getIs_host()!=0){
|
||||
read=3;
|
||||
}else if (roomInfoResp.getUser_info().getIs_management()!=0){
|
||||
read=2;
|
||||
}else {
|
||||
read=4;
|
||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() != 0) {
|
||||
read = 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() != 0) {
|
||||
read = 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getPit_number()!=0){
|
||||
isSelected=true;
|
||||
else if (roomInfoResp.getUser_info().getIs_host() != 0 ) {
|
||||
read = 3;
|
||||
}else {
|
||||
isSelected=false;
|
||||
read = 4;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getPit_number() != 0) {
|
||||
isSelected = true;
|
||||
} else {
|
||||
isSelected = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,9 +111,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);
|
||||
;
|
||||
// int heightInPx = (int) (heightInDp * getResources().getDisplayMetrics().density);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
// 可选:设置动画样式(从底部弹出)
|
||||
window.setWindowAnimations(com.qxcm.moduleutil.R.style.CommonShowDialogBottom);
|
||||
@@ -125,31 +129,33 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
dataList = new ArrayList<>();
|
||||
effectOn = (SpUtil.getOpenEffect() == 1) ? true : false;
|
||||
dataList = new ArrayList<>();
|
||||
effectOn = SpUtil.getOpenEffect() == 1;
|
||||
boolean b = roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1");
|
||||
LogUtils.e("effectOn=" + effectOn);
|
||||
// 添加标题和对应的内容项
|
||||
dataList.add(new RoomSettingBean("房间类型", null, null, null, -1,read,isSelected,false));
|
||||
dataList.add(new RoomSettingBean("点唱", "ic_sing", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeSing,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("拍卖", "ic_auction", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeAuction,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("男神", "ic_boy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeBoy,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("女神", "ic_girl", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeGirl,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("房间类型", null, null, null, -1, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("点唱", "ic_sing", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeSing, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("拍卖", "ic_auction", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeAuction, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("男神", "ic_boy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeBoy, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("女神", "ic_girl", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeGirl, read, isSelected, false, false));
|
||||
|
||||
dataList.add(new RoomSettingBean("常用工具", null, null, null, -1,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("房间补贴", "ic_subsidy", null, null, RoomSettingBean.QXRoomSettingTypeRoomSubsidy,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("主持设置", "ic_compere", null, null, RoomSettingBean.QXRoomSettingTypeRoomCompere,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("清空消息", "ic_clear_message", null, null, RoomSettingBean.QXRoomSettingTypeRoomClearMessage,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("排麦模式", "ic_order_mic", null, null, QXRoomSettingTypeRoomOrderMic,read,isSelected, !roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")));
|
||||
dataList.add(new RoomSettingBean("背景音乐", "ic_bg_music", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgMusic,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("常用工具", null, null, null, -1, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("房间补贴", "ic_subsidy", null, null, RoomSettingBean.QXRoomSettingTypeRoomSubsidy, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("主持设置", "ic_compere", null, null, RoomSettingBean.QXRoomSettingTypeRoomCompere, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("清空消息", "ic_clear_message", null, null, RoomSettingBean.QXRoomSettingTypeRoomClearMessage, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("排麦模式", "ic_order_mic", null, null, QXRoomSettingTypeRoomOrderMic, read, isSelected,false, roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")));//等于1的时候,是排麦模式,等于2的时候,是自由模式,这里判断是否是拍卖模式,
|
||||
dataList.add(new RoomSettingBean("背景音乐", "ic_bg_music", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgMusic, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("背景图片", "ic_bg_image", null, null, RoomSettingBean.QXRoomSettingTypeRoomBgImage, read, isSelected, false, false));
|
||||
|
||||
dataList.add(new RoomSettingBean("更多操作", null, null, null, -1,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("离开房间", "ic_leave", null, null, RoomSettingBean.QXRoomSettingTypeRoomLeave,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("分享房间", "ic_share", null, null, RoomSettingBean.QXRoomSettingTypeRoomShare,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("调音台", "ic_my_dress", null, null, RoomSettingBean.QXRoomSettingTypeRoomMyDress,read,isSelected, false));
|
||||
dataList.add(new RoomSettingBean("房间设置", "ic_room_setting", null, null, RoomSettingBean.QXRoomSettingTypeRoomSetting,read,isSelected, false));
|
||||
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_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(effectOn ? "关闭特效" : "打开特效", "ic_close_effects", null, null, RoomSettingBean.QXRoomSettingTypeRoomCloseEffects,read,isSelected, effectOn));
|
||||
dataList.add(new RoomSettingBean("意见反馈", "ic_report", null, null, RoomSettingBean.QXRoomSettingTypeRoomReport,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));
|
||||
List<RoomSettingBean> filteredList = new ArrayList<>();
|
||||
// 更新 itemType
|
||||
for (RoomSettingBean bean : dataList) {
|
||||
@@ -161,14 +167,15 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
} else {
|
||||
bean.setStatus(false);
|
||||
}
|
||||
|
||||
bean.updateItemType();
|
||||
|
||||
if (bean.isStatus()){
|
||||
if (bean.isStatus()) {
|
||||
filteredList.add(bean);
|
||||
}
|
||||
}
|
||||
adapter = new RoomSettingAdapter(filteredList);
|
||||
mBinding.recycleView.setAdapter(adapter);
|
||||
mBinding.recycleView.setAdapter(adapter);
|
||||
// 动态设置 GridLayoutManager 的列数
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 6); // 默认每行 4 个 item
|
||||
|
||||
@@ -194,9 +201,9 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
// 示例:切换选择状态
|
||||
if (bean.getType() == QXRoomSettingTypeRoomOrderMic) {
|
||||
MvpPre.changeRoom(roomId, SpUtil.getUserId()+"",position, bean);
|
||||
MvpPre.changeRoom(roomId, SpUtil.getUserId() + "", position, bean);
|
||||
|
||||
}else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomClearMessage){
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomClearMessage) {
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
t.setText("清空消息");
|
||||
RoomMessageEvent roomMessageEvent = new RoomMessageEvent(123, roomId, t);
|
||||
@@ -209,76 +216,108 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
roomId,
|
||||
binaryData
|
||||
);
|
||||
} else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomMyDress) {
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomMyDress) {
|
||||
TunerDialogFragment.show(roomId, getChildFragmentManager());
|
||||
} else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomCompere) {//主持设置
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomCompere) {//主持设置
|
||||
RoomHostFragment.newInstance(roomId).show(getChildFragmentManager(), "RoomHostFragment");
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomBgImage){//背景图片
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomBgImage) {//背景图片
|
||||
RoomBackgroundDialogFragment.newInstance(roomId).show(getChildFragmentManager(), "RoomBackgroundDialogFragment");
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomCloseEffects){//关闭特效
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomCloseEffects) {//关闭特效
|
||||
if (effectOn) {
|
||||
//关闭
|
||||
effectOn = false;
|
||||
//保存到本地
|
||||
SpUtil.setOpenEffect(0);
|
||||
EventBus.getDefault().post(new EffectEvent(false));
|
||||
bean.setStatus(true);
|
||||
bean.setSelect(false);
|
||||
} else {
|
||||
//打开
|
||||
effectOn = true;
|
||||
SpUtil.setOpenEffect(1);
|
||||
EventBus.getDefault().post(new EffectEvent(true));
|
||||
bean.setStatus(false);
|
||||
bean.setSelect(true);
|
||||
}
|
||||
adapter.notifyItemChanged(position);
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
upAdapter();
|
||||
// adapter.notifyItemChanged(position);
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
EventBus.getDefault().post(new MusicEvent());
|
||||
|
||||
dismiss();
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomLeave){
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomLeave) {
|
||||
EventBus.getDefault().post(new RoomOutEvent());
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomTypeSing){
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSing) {
|
||||
MvpPre.changeRoomType(roomId, "1");
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomTypeAuction){
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction) {
|
||||
MvpPre.changeRoomType(roomId, "2");
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomTypeBoy){
|
||||
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomTypeGirl){
|
||||
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomSetting){
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy) {
|
||||
MvpPre.changeRoomType(roomId, "3");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl) {
|
||||
MvpPre.changeRoomType(roomId, "4");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void upAdapter() {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private boolean isItemVisible(RoomSettingBean bean) {
|
||||
int type = bean.getType();
|
||||
int roleLevel = bean.getRead(); // 角色等级
|
||||
boolean onMic = bean.isSelected(); // 是否在麦位上
|
||||
boolean onMic = false; // 是否是特定房间
|
||||
|
||||
if (roomInfoResp.getRoom_info().getType_id().equals("1") && roomInfoResp.getRoom_info().getLabel_id().equals("2") ){
|
||||
onMic=true;
|
||||
}
|
||||
|
||||
// 房主显示全部
|
||||
if (roleLevel == 1 ) {
|
||||
if (!onMic && type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic ){
|
||||
return false;
|
||||
if (roleLevel == 1) {
|
||||
if (onMic) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}else if (roleLevel == 3 && onMic) {// 主持且在麦位上
|
||||
if (
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomClearMessage ||
|
||||
type == QXRoomSettingTypeRoomOrderMic ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
}else if (roleLevel == 2 || roleLevel == 3){
|
||||
if (type== RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl||
|
||||
type== RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage||type == -1){
|
||||
if (onMic ) {
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// 更多操作条目也显示
|
||||
if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
|
||||
type <= RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}else if (roleLevel == 3 && !onMic && type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) { // 主持但不在麦位上时,隐藏背景音乐
|
||||
return false;
|
||||
}else { // 普通用户只显示更多操作中的特定条目
|
||||
}
|
||||
// else if (roleLevel == 3 ) {// 主持且在麦位上
|
||||
// if (type== RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||
// type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl||
|
||||
// type== RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic
|
||||
// || type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage) {
|
||||
// return true;
|
||||
// }
|
||||
// // 更多操作条目也显示
|
||||
// if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
|
||||
// type <= RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// else if (roleLevel == 3 && !onMic && type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) { // 主持但不在麦位上时,隐藏背景音乐
|
||||
// return false;
|
||||
// }
|
||||
else { // 普通用户只显示更多操作中的特定条目
|
||||
return type == RoomSettingBean.QXRoomSettingTypeRoomLeave ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomShare ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ||
|
||||
@@ -295,21 +334,21 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
mBinding.cl.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
PublishCommentDialogFragment.show(roomId,getChildFragmentManager());
|
||||
PublishCommentDialogFragment.show(roomId, getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onRoomSettingEvent(RoomSettingEvent event) {
|
||||
if (event.getType()==1014){
|
||||
for (int i = 0; i < dataList.size(); i++){
|
||||
if (event.getType() == 1014) {
|
||||
for (int i = 0; i < dataList.size(); i++) {
|
||||
RoomSettingBean bean = (RoomSettingBean) adapter.getItem(i);
|
||||
if (bean.getType()==QXRoomSettingTypeRoomOrderMic){
|
||||
if (event.getRoom_up_pit_type()==2){
|
||||
if (bean.getType() == QXRoomSettingTypeRoomOrderMic) {
|
||||
if (event.getRoom_up_pit_type() == 2) {
|
||||
bean.setStatus(true);
|
||||
adapter.notifyItemChanged(i);
|
||||
}else {
|
||||
} else {
|
||||
bean.setStatus(false);
|
||||
adapter.notifyItemChanged(i);
|
||||
}
|
||||
@@ -326,13 +365,20 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
@Override
|
||||
public void changeRoomSuccess(String s, int position, RoomSettingBean bean) {
|
||||
// if (bean.getName().contains("排麦")){
|
||||
if (bean.isSelect()){
|
||||
bean.setSelect(false);
|
||||
adapter.notifyItemChanged(position);
|
||||
}else {
|
||||
bean.setSelect(true);
|
||||
adapter.notifyItemChanged(position);
|
||||
}
|
||||
// if (bean.getName().contains("排麦")) {
|
||||
// bean.setName("自由模式");
|
||||
// bean.setStatus( true);
|
||||
// bean.setSelect(false);
|
||||
// adapter.notifyItemChanged(position);
|
||||
// }else {
|
||||
// } else {
|
||||
// bean.setName("排麦模式");
|
||||
// bean.setStatus( false);
|
||||
// bean.setSelect(true);
|
||||
// adapter.notifyItemChanged(position);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -14,26 +14,27 @@ import androidx.fragment.app.FragmentManager;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.contacts.RoomUserContacts;
|
||||
import com.example.moduleroom.databinding.FragmentRoomUserInfoBinding;
|
||||
import com.example.moduleroom.fragment.RelationshipFragment;
|
||||
import com.example.moduleroom.fragment.RequestFragment;
|
||||
import com.example.moduleroom.fragment.RoomChartsFragment;
|
||||
import com.example.moduleroom.fragment.RoomFragment;
|
||||
import com.example.moduleroom.presenter.RoomUserPresenter;
|
||||
import com.example.moduletablayout.CustomSlidingTabLayout;
|
||||
import com.example.zhouwei.library.CustomPopWindow;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.RelationCardBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUserBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.TimeUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||
@@ -58,17 +59,21 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
private String is_room_owner;//是否是房主
|
||||
private String is_host;//是否是主持
|
||||
private String is_management;//是否是管理
|
||||
private int type;//1:房主并且是在支持麦 2:管理员并且在支持麦 3:主持并且在支持麦 4:普通用户
|
||||
private int type;//1:房主并且是在支持麦 2:管理员并且在支持麦 3:主持并且在支持麦 4:普通用户 [要查看的用户类型]
|
||||
private int close_type;//被查看的用户类型 1:房主 2:管理员 3:主持 4:普通用户 [要关闭的用户类型]
|
||||
private String value;
|
||||
private View contentView;
|
||||
boolean isPk;
|
||||
private int paim;//这是判断是否是拍卖模式 1:拍卖房 2:K歌房 3:语聊房 4:在线列表 5:聊天房,
|
||||
private int isNum;//这里是当是拍卖房的时候,这个参数就是当前拍卖的id
|
||||
private int guanType; // 1: 关系卡 2: 关系位
|
||||
|
||||
@Override
|
||||
protected RoomUserPresenter bindPresenter() {
|
||||
return new RoomUserPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
public static void show(String room_id, String user_id, String pit_number, int type,boolean isPk, FragmentManager fragmentManager) {
|
||||
public static void show(String room_id, String user_id, String pit_number, int type,boolean isPk,int paim,int isNum, FragmentManager fragmentManager) {
|
||||
RoomUserInfoFragment dialogFragment = new RoomUserInfoFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", room_id); // 可选:传递参数
|
||||
@@ -76,6 +81,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
args.putString("pit_number", pit_number);
|
||||
args.putInt("type", type);
|
||||
args.putBoolean("isPk", isPk);
|
||||
args.putInt("paim", paim);
|
||||
args.putInt("isNum", isNum);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RoomUserInfoFragment");
|
||||
}
|
||||
@@ -89,6 +96,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
type = getArguments().getInt("type");
|
||||
value = getArguments().getString("value");
|
||||
isPk = getArguments().getBoolean("isPk");
|
||||
paim = getArguments().getInt("paim");
|
||||
isNum = getArguments().getInt("isNum");
|
||||
if (isPk){
|
||||
type=4;
|
||||
}
|
||||
@@ -126,16 +135,10 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
@Override
|
||||
protected void initView() {
|
||||
String[] title = new String[]{"关系卡", "关系位"};
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
fragments.add(RelationshipFragment.newInstance());
|
||||
fragments.add(RelationshipFragment.newInstance());
|
||||
MyFragmentPagerAdapter myFragmentPagerAdapter = new MyFragmentPagerAdapter(fragments, getChildFragmentManager());
|
||||
mBinding.vpRelationship.setAdapter(myFragmentPagerAdapter);
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.vpRelationship, title);
|
||||
|
||||
|
||||
|
||||
mBinding.ivAvatar.setOnClickListener(this::onClick);
|
||||
mBinding.roomMCz.setOnClickListener(this::onClick);
|
||||
mBinding.roomDian.setOnClickListener(this::onClick);
|
||||
mBinding.imRoomT.setOnClickListener(this::onClick);
|
||||
@@ -143,6 +146,14 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.imRoomGz.setOnClickListener(this::onClick);
|
||||
mBinding.imRoomSl.setOnClickListener(this::onClick);
|
||||
mBinding.roomLh.setOnClickListener(this::onClick);
|
||||
mBinding.roomRlGift.setOnClickListener(this::onClick);
|
||||
mBinding.roomJb.setOnClickListener(this::onClick);
|
||||
mBinding.tvZb.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.textView1.setOnClickListener(this::onClick);
|
||||
mBinding.textView2.setOnClickListener(this::onClick);
|
||||
mBinding.moreButton.setOnClickListener(this::onClick);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -150,9 +161,12 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
int id = view.getId();
|
||||
if (id == R.id.room_m_cz) {
|
||||
if (mBinding.roomMCz.getText().equals("上麦")) {
|
||||
|
||||
} else {
|
||||
MvpPre.hostUserPit(room_id, pit_number, user_id, "2");
|
||||
if(user_id.equals(SpUtil.getUserId()+"")){
|
||||
MvpPre.downPit(room_id, pit_number);
|
||||
}else {
|
||||
MvpPre.hostUserPit(room_id, pit_number, user_id, "2");
|
||||
}
|
||||
}
|
||||
} else if (id == R.id.room_dian) {
|
||||
contentView = LayoutInflater.from(getContext()).inflate(R.layout.pop_menu, null);
|
||||
@@ -175,10 +189,34 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
MvpPre.userGuanz(user_id, "1");
|
||||
}else if (id == R.id.im_room_sl){
|
||||
userInfo.setPit_number(pit_number);
|
||||
RoomGiftDialogFragment.show( null,userInfo, room_id,getParentFragmentManager());
|
||||
RoomGiftDialogFragment.show( null,userInfo, room_id,0,getParentFragmentManager());
|
||||
dismiss();
|
||||
}else if (id == R.id.room_lh){
|
||||
MvpPre.addBlackList(user_id);
|
||||
}else if (id == R.id.room_rl_gift){
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id()+"").withInt("type",1).navigation();
|
||||
|
||||
// UserGiftWallRoomFragment.newInstance(Integer.parseInt(user_id)).show(getChildFragmentManager(), "UserGiftWallRoomFragment");
|
||||
}else if (id == R.id.room_jb){
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", "https://vespa.qxmier.com/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
}else if (id==R.id.iv_avatar){
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id()+"").navigation();
|
||||
}else if (id==R.id.tv_zb){
|
||||
RoomHostZBDialog dialog = new RoomHostZBDialog(getContext());
|
||||
dialog.setListener(new RoomHostIncomeDialog.OnConfirmClickListener() {
|
||||
@Override
|
||||
public void onConfirm(String proportion) {
|
||||
MvpPre.giveCoin(user_id, proportion);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}else if (id==R.id.more_button){
|
||||
RelationshipFragment.show(user_id,guanType,getParentFragmentManager());
|
||||
dismiss();
|
||||
}else if (id==R.id.textView1){
|
||||
dianj(1);
|
||||
}else if (id==R.id.textView2){
|
||||
dianj(2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +261,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
MvpPre.setMutePit(room_id, user_id, "1");
|
||||
}
|
||||
} else if (id == R.id.action_report) {
|
||||
showContent = "点击 Item菜单6";
|
||||
// showContent = "点击 Item菜单6";
|
||||
//TODO 举报功能
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", "https://vespa.qxmier.com/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
} else if (id == R.id.action_blacklist) {
|
||||
MvpPre.addBlackList(user_id);
|
||||
}
|
||||
@@ -251,6 +291,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
if (type != 1 && type != 2) {
|
||||
contentView.findViewById(R.id.action_set_host).setVisibility(GONE);
|
||||
}
|
||||
if (paim==1){
|
||||
contentView.findViewById(R.id.action_kick_out).setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private String getValue(int type, String key) {
|
||||
@@ -261,20 +304,22 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
textMap.put("is_mute_pit", userInfo.getIs_mute().equals("1") ? "解除禁言" : "禁言");
|
||||
|
||||
switch (type) {
|
||||
case 1:
|
||||
case 1://房主
|
||||
if ("is_manager".equals(key)) return textMap.get("is_manager");
|
||||
if ("is_host".equals(key)) return textMap.get("is_host");
|
||||
if ("is_mute".equals(key)) return textMap.get("is_mute");
|
||||
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
|
||||
break;
|
||||
case 2:
|
||||
if ("is_host".equals(key)) return textMap.get("is_host");
|
||||
// if ("is_host".equals(key)) return textMap.get("is_host");
|
||||
if ("is_mute".equals(key)) return textMap.get("is_mute");
|
||||
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
|
||||
break;
|
||||
case 3:
|
||||
if ("is_mute".equals(key)) return textMap.get("is_mute");
|
||||
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
|
||||
break;
|
||||
default:
|
||||
if ("is_mute".equals(key)) return textMap.get("is_mute");
|
||||
if ("is_mute_pit".equals(key)) return textMap.get("is_mute_pit");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -289,6 +334,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
@Override
|
||||
public void getRoomUserInfo(UserInfo userInfo1) {
|
||||
userInfo = userInfo1;
|
||||
// if (paim==1){
|
||||
// userInfo.setAuction_id(isNum+"");
|
||||
// }
|
||||
// ImageUtils.loadHeadCC(userInfo.getAvatar(), mBinding.ivAvatar);
|
||||
mBinding.ivAvatar.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
||||
mBinding.tvName.setText(userInfo.getNickname());
|
||||
@@ -298,6 +346,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
} else {
|
||||
mBinding.roomMCz.setText("上麦");
|
||||
}
|
||||
|
||||
if(userInfo.getIs_follow()==1){
|
||||
mBinding.imRoomGz.setImageDrawable(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.room_ygz));
|
||||
}else {
|
||||
@@ -308,60 +357,247 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
// mBinding.imGs.setVisibility(GONE);
|
||||
// }else {
|
||||
// mBinding.imGs.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (userInfo.getIs_room_owner().equals("1")){
|
||||
close_type=1;
|
||||
}else if (userInfo.getIs_manager().equals("1")){
|
||||
close_type=2;
|
||||
}else if (userInfo.getIs_host().equals("1")){
|
||||
close_type=3;
|
||||
}else {
|
||||
close_type=4;
|
||||
}
|
||||
|
||||
if (user_id.equals(SpUtil.getUserId()+"")){
|
||||
mBinding.tvGh.setVisibility(GONE);
|
||||
}else {
|
||||
if (userInfo!=null) {
|
||||
if (userInfo.getRed_status().equals("1")) {
|
||||
mBinding.tvGh.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.tvGh.setVisibility(GONE);
|
||||
}
|
||||
}else {
|
||||
mBinding.tvGh.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
mBinding.tvTs.setText(String.format("90天内累计收到 %s 个礼物", userInfo.getGift_num()));
|
||||
|
||||
updateUIBasedOnTypeAndUser();
|
||||
dianj(1);
|
||||
}
|
||||
|
||||
public void dianj(int type){
|
||||
if (type==1) {
|
||||
guanType=1;
|
||||
setTextViewStyle(mBinding.textView2, false);
|
||||
setTextViewStyle(mBinding.textView1, true);
|
||||
if (userInfo.getQinmi() != null && !userInfo.getQinmi().equals("")) {
|
||||
mBinding.ll.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guxi_k);
|
||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.regit_t);
|
||||
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar1(), mBinding.userNav1);
|
||||
ImageUtils.loadHeadCC(userInfo.getQinmi().getAvatar2(), mBinding.userNav2);
|
||||
mBinding.tvNickname1.setText(userInfo.getQinmi().getNickname1());
|
||||
mBinding.tvNickname2.setText(userInfo.getQinmi().getNickname2());
|
||||
mBinding.tvRelation.setText(userInfo.getQinmi().getRelation_name());
|
||||
mBinding.tvTime.setText(TimeUtils.formatDuration2(Long.parseLong(userInfo.getQinmi().getEnd_time())*1000 - System.currentTimeMillis()));
|
||||
}else {
|
||||
mBinding.ll.setVisibility(GONE);
|
||||
}
|
||||
}else if (type==2){
|
||||
guanType=2;
|
||||
setTextViewStyle(mBinding.textView2, true);
|
||||
setTextViewStyle(mBinding.textView1, false);
|
||||
if (userInfo.getZhenai() != null && !userInfo.getZhenai().equals("")) {
|
||||
mBinding.ll.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guxi_w);
|
||||
// mBinding.rlReqit.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.guanxiw_z);
|
||||
ImageUtils.loadHeadCC(userInfo.getZhenai().getAvatar1(), mBinding.userNav1);
|
||||
ImageUtils.loadHeadCC(userInfo.getZhenai().getAvatar2(), mBinding.userNav2);
|
||||
mBinding.tvNickname1.setText(userInfo.getZhenai().getNickname1());
|
||||
mBinding.tvNickname2.setText(userInfo.getZhenai().getNickname2());
|
||||
mBinding.tvRelation.setText(userInfo.getZhenai().getRelation_name());
|
||||
mBinding.tvTime.setText(TimeUtils.formatDuration2(Long.parseLong(userInfo.getZhenai().getEnd_time())*1000 - System.currentTimeMillis()));
|
||||
}else {
|
||||
mBinding.ll.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private void setTextViewStyle(TextView textView, boolean isSelected) {
|
||||
if (isSelected) {
|
||||
textView.setTextColor(getResources().getColor(android.R.color.white));
|
||||
textView.setTextSize(16);
|
||||
} else {
|
||||
textView.setTextColor(getResources().getColor(android.R.color.darker_gray));
|
||||
textView.setTextSize(14);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateUIBasedOnTypeAndUser() {
|
||||
int userId= SpUtil.getUserId();
|
||||
boolean isSelf =userId==userInfo.getUser_id();
|
||||
// if (pit_number!=null && pit_number.equals("-1")){
|
||||
// type=0;
|
||||
// isSelf=false;
|
||||
// }
|
||||
if (userInfo.getIs_in_pit() == 1){
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
}
|
||||
if (paim==1 && pit_number!=null &&( pit_number.equals("888") || pit_number.equals("111") || pit_number.equals("222") || pit_number.equals("333"))){
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 1: // 房主
|
||||
case 2: // 管理员
|
||||
case 3: // 主持
|
||||
if (isSelf) {
|
||||
mBinding.roomDian.setVisibility(View.VISIBLE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
break;
|
||||
case 2://管理员
|
||||
if (close_type==1){ //管理员查看房主信息
|
||||
mBinding.roomDian.setVisibility(View.GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
mBinding.roomBo.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
|
||||
}else {
|
||||
mBinding.roomDian.setVisibility(View.VISIBLE);
|
||||
mBinding.roomJb.setVisibility(GONE);
|
||||
mBinding.roomLh.setVisibility(GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
// if (isNum==1){
|
||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
// }else {
|
||||
// mBinding.roomMCz.setVisibility(GONE);
|
||||
// }
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}
|
||||
break;
|
||||
case 4: // 普通用户
|
||||
mBinding.roomDian.setVisibility(View.GONE);
|
||||
if (isSelf) {
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(View.GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
case 3:
|
||||
if (close_type==1 ||close_type==2){ //主持查看房主或者管理员信息
|
||||
mBinding.roomDian.setVisibility(View.GONE);
|
||||
mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
mBinding.roomMCz.setVisibility(View.GONE);
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
}else {
|
||||
mBinding.roomDian.setVisibility(View.VISIBLE);
|
||||
mBinding.roomJb.setVisibility(GONE);
|
||||
mBinding.roomLh.setVisibility(GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
// if (isNum==1){
|
||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
// }else {
|
||||
// mBinding.roomMCz.setVisibility(GONE);
|
||||
// }
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
mBinding.roomDian.setVisibility(View.GONE);
|
||||
if (isSelf) {
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (close_type==1 ||close_type==2 ||close_type==3) {
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
mBinding.roomMCz.setVisibility(GONE);
|
||||
mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
mBinding.roomMCz.setVisibility(View.GONE);
|
||||
}
|
||||
if (isSelf){
|
||||
mBinding.roomDian.setVisibility(GONE);
|
||||
mBinding.roomJb.setVisibility(View.GONE);
|
||||
mBinding.roomLh.setVisibility(View.GONE);
|
||||
mBinding.roomBo.setVisibility(GONE);
|
||||
mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// 默认处理
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// switch (type) {
|
||||
// case 1: // 房主
|
||||
// case 2: // 管理员
|
||||
// case 3: // 主持
|
||||
// if (isSelf) {
|
||||
// mBinding.roomDian.setVisibility(View.GONE);
|
||||
// mBinding.roomJb.setVisibility(View.GONE);
|
||||
// mBinding.roomLh.setVisibility(View.GONE);
|
||||
// mBinding.roomBo.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// mBinding.roomDian.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomJb.setVisibility(View.GONE);
|
||||
// mBinding.roomLh.setVisibility(View.GONE);
|
||||
// mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// break;
|
||||
// case 4: // 普通用户
|
||||
// mBinding.roomDian.setVisibility(View.GONE);
|
||||
// if (isSelf) {
|
||||
// mBinding.roomJb.setVisibility(View.GONE);
|
||||
// mBinding.roomLh.setVisibility(View.GONE);
|
||||
// mBinding.roomBo.setVisibility(View.GONE);
|
||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomMCz.setVisibility(View.GONE);
|
||||
// }
|
||||
// break;
|
||||
// case 0:
|
||||
// mBinding.roomDian.setVisibility(View.GONE);
|
||||
// if (isSelf) {
|
||||
// mBinding.roomJb.setVisibility(View.GONE);
|
||||
// mBinding.roomLh.setVisibility(View.GONE);
|
||||
// mBinding.roomBo.setVisibility(View.GONE);
|
||||
// mBinding.roomMCz.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.roomJb.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomLh.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomBo.setVisibility(View.VISIBLE);
|
||||
// mBinding.roomMCz.setVisibility(View.GONE);
|
||||
// }
|
||||
// default:
|
||||
// // 默认处理
|
||||
// break;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -404,6 +640,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
public void setMutePit(String user_id, String is_mute) {
|
||||
if (is_mute.equals("1")) {
|
||||
userInfo.setIs_mute("1");
|
||||
ToastUtils.show("禁麦成功");
|
||||
|
||||
} else if (is_mute.equals("3")) {
|
||||
userInfo.setIs_mute("0");
|
||||
} else if (is_mute.equals("2")) {
|
||||
@@ -434,4 +672,25 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveCoin() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void relationCard(RelationCardBean list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String s) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import com.qxcm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.GiftLabelBean;
|
||||
import com.qxcm.moduleutil.bean.GiftNumBean;
|
||||
import com.qxcm.moduleutil.bean.GiftPackBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoomWheatEvent;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
@@ -103,7 +104,6 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
||||
@Override
|
||||
protected void initData() {
|
||||
// MvpPre.getGiftList("0",3);
|
||||
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), fragmentList));
|
||||
|
||||
}
|
||||
@@ -214,6 +214,11 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giftPack(List<GiftPackBean> giftPackBean) {
|
||||
|
||||
}
|
||||
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<Fragment> fragmentList;
|
||||
@@ -226,7 +231,7 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance("0", 1);
|
||||
Fragment fragment = GiftTwoDetailsFragment.newInstance("1", 0);
|
||||
fragmentList.add(fragment); // 保存 Fragment 实例
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TunerDialogFragment extends BaseMvpDialogFragment<WheatPresenter, R
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);;
|
||||
int heightInDp = (int) (screenHeight * 0.4f);;
|
||||
// int heightInPx = (int) (heightInDp * getResources().getDisplayMetrics().density);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, heightInDp);
|
||||
|
||||
@@ -109,10 +109,15 @@ public class TunerDialogFragment extends BaseMvpDialogFragment<WheatPresenter, R
|
||||
SpUtil.setAuricularBack(b ? 1 : 0);
|
||||
}
|
||||
});
|
||||
int progress = SpUtil.getMusicVolume();
|
||||
if (progress == 0) {
|
||||
progress = 100;
|
||||
}
|
||||
mBinding.seekBar1.setProgress(progress);
|
||||
// 设置 seekBar1 的默认进度为 100
|
||||
mBinding.seekBar1.setProgress(100);
|
||||
// mBinding.seekBar1.setProgress(100);
|
||||
// 更新对应的 TextView 显示内容
|
||||
mBinding.tvSeekbarValue.setText("人声100%");
|
||||
mBinding.tvSeekbarValue.setText("人声" + progress + "%");
|
||||
|
||||
|
||||
mBinding.seekBar1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@@ -120,6 +125,7 @@ public class TunerDialogFragment extends BaseMvpDialogFragment<WheatPresenter, R
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
mBinding.tvSeekbarValue.setText("人声" + progress + "%");
|
||||
SpUtil.setMusicVolume(progress);
|
||||
AgoraManager.getInstance(getContext()).setMusicVolume(progress);
|
||||
}
|
||||
|
||||
@@ -133,15 +139,20 @@ public class TunerDialogFragment extends BaseMvpDialogFragment<WheatPresenter, R
|
||||
|
||||
}
|
||||
});
|
||||
int progress2 = SpUtil.gettPlayoutVolume();
|
||||
if (progress2 == 0) {
|
||||
progress2 = 100;
|
||||
}
|
||||
// 设置 seekBar1 的默认进度为 100
|
||||
mBinding.seekBar2.setProgress(100);
|
||||
mBinding.seekBar2.setProgress(progress2);
|
||||
// 更新对应的 TextView 显示内容
|
||||
mBinding.tvSeekbarValue2.setText("伴奏100%");
|
||||
mBinding.tvSeekbarValue2.setText("伴奏" + progress2 + "%");
|
||||
|
||||
mBinding.seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
mBinding.tvSeekbarValue2.setText("伴奏" + progress + "%");
|
||||
SpUtil.settPlayoutVolume(progress);
|
||||
AgoraManager.getInstance(getContext()).settPlayoutVolume(progress);
|
||||
}
|
||||
|
||||
@@ -218,8 +229,8 @@ public class TunerDialogFragment extends BaseMvpDialogFragment<WheatPresenter, R
|
||||
List<MixerResp> mixerResps = new ArrayList<>();
|
||||
mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_OFF, "原生", com.qxcm.moduleutil.R.mipmap.yuansheng));
|
||||
mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_CPJ, "唱片机", com.qxcm.moduleutil.R.mipmap.changpian));
|
||||
mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_3W, "3维声音", com.qxcm.moduleutil.R.mipmap.sanwei));
|
||||
mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_XN, "虚拟环绕", com.qxcm.moduleutil.R.mipmap.xuni));
|
||||
// mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_3W, "3维声音", com.qxcm.moduleutil.R.mipmap.sanwei));
|
||||
// mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_XN, "虚拟环绕", com.qxcm.moduleutil.R.mipmap.xuni));
|
||||
mixerResps.add(new MixerResp(RtcConstants.AUDIO_EFFECT_KTV, "KTV", com.qxcm.moduleutil.R.mipmap.ktv));
|
||||
tunerAdapter.setNewData(mixerResps);
|
||||
tunerAdapter.setIndex(0);
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.contacts.UserGiftWallConacts;
|
||||
import com.example.moduleroom.databinding.MeFagmentUserGiftWallBinding;
|
||||
import com.example.moduleroom.presenter.UserGiftWallPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 礼物墙
|
||||
*/
|
||||
public class UserGiftWallRoomFragment extends BaseMvpDialogFragment<UserGiftWallPresenter, MeFagmentUserGiftWallBinding> implements UserGiftWallConacts.View {
|
||||
|
||||
private int userId;
|
||||
|
||||
private BaseQuickAdapter<GiftUserWallBean.GiftWallBean, BaseViewHolder> mAdapter;
|
||||
|
||||
// TODO: Customize parameter initialization
|
||||
@SuppressWarnings("unused")
|
||||
public static UserGiftWallRoomFragment newInstance(int userId) {
|
||||
UserGiftWallRoomFragment fragment = new UserGiftWallRoomFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("userId", userId);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initArgs(Bundle arguments) {
|
||||
super.initArgs(arguments);
|
||||
userId = arguments.getInt("userId");
|
||||
|
||||
|
||||
}
|
||||
|
||||
// TODO: 2025/3/7 固定dialog显示的位置和大小
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.dimAmount = 0.4f;
|
||||
// 固定对话框的宽度和高度
|
||||
lp.width = WindowManager.LayoutParams.MATCH_PARENT; // 宽度设置为屏幕宽度
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT; // 高度设置为内容高度
|
||||
|
||||
window.setAttributes(lp);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 4);
|
||||
mBinding.recyclerView.setLayoutManager(gridLayoutManager);
|
||||
mAdapter = new BaseQuickAdapter<GiftUserWallBean.GiftWallBean, BaseViewHolder>(R.layout.me_item_user_gift_wall, null) {
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, GiftUserWallBean.GiftWallBean item) {
|
||||
helper.setText(R.id.tv_gift_name, item.getGift_name());
|
||||
if (item.getBase_image() == null || item.getBase_image().isEmpty()) {
|
||||
helper.setImageResource(R.id.image, com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
} else {
|
||||
ImageUtils.loadImageView(item.getBase_image(), helper.getView(R.id.image));
|
||||
}
|
||||
if (item.getBase_image() == null || item.getBase_image().isEmpty()) {
|
||||
helper.setImageResource(R.id.iv_gift_pic, com.qxcm.moduleutil.R.mipmap.default_avatar);
|
||||
} else {
|
||||
ImageUtils.loadImageView(item.getBase_image(), helper.getView(R.id.iv_gift_pic));
|
||||
}
|
||||
// helper.setText(R.id.tv_price, item.getGiftPrice());
|
||||
helper.setText(R.id.tv_price33, item.getGift_price());
|
||||
helper.setText(R.id.tv_gift_values, "x" + item.getTotal_count());
|
||||
// if (item.getIs_show()==0){
|
||||
// helper.getView(R.id.cl_gift_item).setAlpha(0.2f);
|
||||
// }else {
|
||||
// helper.getView(R.id.cl_gift_item).setAlpha(1f);
|
||||
// }
|
||||
if (item.getTop_users() != null && item.getTop_users().size() > 0) {
|
||||
helper.getView(R.id.cl_gift_item).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.liang);
|
||||
} else {
|
||||
helper.getView(R.id.cl_gift_item).setBackgroundResource(com.qxcm.moduleutil.R.mipmap.not_liang);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
mBinding.recyclerView.setAdapter(mAdapter);
|
||||
mAdapter.bindToRecyclerView(mBinding.recyclerView);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected UserGiftWallPresenter bindPresenter() {
|
||||
return new UserGiftWallPresenter(this, getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.giftWall(userId + "");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.me_fagment_user_gift_wall;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setGiftWall(GiftUserWallBean data) {
|
||||
// if (data != null && data.size() > 0) {
|
||||
// if (homePageInfoActivity != null) {
|
||||
// homePageInfoActivity.setTab(2);
|
||||
// }
|
||||
// mUserGiftWallAdapter.setNewData(data);
|
||||
List<GiftUserWallBean.GiftWallBean> giftWallBeans = new ArrayList<>();
|
||||
giftWallBeans.addAll(data.getLiang());
|
||||
giftWallBeans.addAll(data.getNo_liang());
|
||||
mBinding.slGiftWall.setVisibility(View.VISIBLE);
|
||||
mAdapter.setNewData(giftWallBeans);
|
||||
}
|
||||
}
|
||||
@@ -42,10 +42,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.agora.musiccontentcenter.Music;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/19
|
||||
*@description: 点唱已点歌曲
|
||||
* @author qx
|
||||
* @data 2025/6/19
|
||||
* @description: 点唱已点歌曲
|
||||
*/
|
||||
public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, FragmentMuiscSongBinding> implements RequestContacts.View {
|
||||
|
||||
@@ -55,23 +56,24 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
private String roomId;
|
||||
private RoomInfoResp roomInfoResp;
|
||||
BaseQuickAdapter<MusicSongBean, BaseViewHolder> adapter;
|
||||
private int page=1;
|
||||
private int page = 1;
|
||||
int status;
|
||||
|
||||
@Override
|
||||
public void songList(List<MusicSongBean> musicSongBeans) {
|
||||
|
||||
|
||||
if (roomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
status = 1;
|
||||
}
|
||||
if (musicSongBeans != null) {
|
||||
for (MusicSongBean musicSongBean : musicSongBeans) {
|
||||
musicSongBean.setIs_hot(status);
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
status = 1;
|
||||
}
|
||||
if (musicSongBeans != null) {
|
||||
for (MusicSongBean musicSongBean : musicSongBeans) {
|
||||
musicSongBean.setIs_hot(status);
|
||||
}
|
||||
}
|
||||
|
||||
// if (page==1){
|
||||
adapter.setNewData(musicSongBeans);
|
||||
adapter.setNewData(musicSongBeans);
|
||||
|
||||
// }else {
|
||||
// adapter.addData(musicSongBeans);
|
||||
@@ -94,6 +96,7 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
public interface OnRequestFragmentListener {
|
||||
void onCloseDialog();
|
||||
}
|
||||
|
||||
private OnRequestFragmentListener listener;
|
||||
|
||||
// 绑定监听器
|
||||
@@ -101,7 +104,7 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public static MusicSongListFragment newInstance(String roomId,RoomInfoResp roomInfoResp,int type) {
|
||||
public static MusicSongListFragment newInstance(String roomId, RoomInfoResp roomInfoResp, int type) {
|
||||
Bundle args = new Bundle();
|
||||
MusicSongListFragment fragment = new MusicSongListFragment();
|
||||
args.putString("roomId", roomId);
|
||||
@@ -142,7 +145,7 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
boolean b= AgoraManager.getInstance(getContext()).isBjMusic();
|
||||
boolean b = AgoraManager.getInstance(getContext()).isBjMusic();
|
||||
if (b) {
|
||||
List<MusicSongBean> musicSongBeans = new ArrayList<>();
|
||||
List<Music> music = AgoraManager.getInstance(getContext()).getMusicList();
|
||||
@@ -158,7 +161,7 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
}
|
||||
adapter.setNewData(musicSongBeans);
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
MvpPre.songList(roomId);
|
||||
}
|
||||
}
|
||||
@@ -195,33 +198,32 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, MusicSongBean item) {
|
||||
|
||||
LogUtils.e("@@@",item);
|
||||
LogUtils.e("@@@", item);
|
||||
// 获取当前 item 的 position
|
||||
int position = helper.getLayoutPosition();
|
||||
ImageView muisSy=helper.getView(R.id.muis_sy);
|
||||
TextView muisPrice=helper.getView(R.id.muis_price);
|
||||
if(position == 0){
|
||||
ImageView muisSy = helper.getView(R.id.muis_sy);
|
||||
TextView muisPrice = helper.getView(R.id.muis_price);
|
||||
if (position == 0) {
|
||||
helper.setText(R.id.muis_price, "结束");
|
||||
|
||||
muisSy.setVisibility(View.GONE);
|
||||
}
|
||||
else if (position==1){
|
||||
} else if (position == 1) {
|
||||
|
||||
muisSy.setVisibility(View.GONE);
|
||||
muisPrice.setVisibility(View.GONE);
|
||||
}else {
|
||||
} else {
|
||||
muisPrice.setVisibility(View.VISIBLE);
|
||||
helper.setText(R.id.muis_price, "置顶");
|
||||
muisSy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
helper.setText(R.id.muis_name, item.getSong_name());
|
||||
if (item.getDuration().isEmpty()){
|
||||
if (item.getDuration().isEmpty()) {
|
||||
helper.setText(R.id.muis_desc, "00:00");
|
||||
}else {
|
||||
helper.setText(R.id.muis_desc, TimeUtils.formatDuration(Long.parseLong(item.getDuration())*1000));
|
||||
} else {
|
||||
helper.setText(R.id.muis_desc, TimeUtils.formatDuration(Long.parseLong(item.getDuration()) * 1000));
|
||||
}
|
||||
helper.setText(R.id.muis_set, "\t"+item.getSinger());
|
||||
helper.setText(R.id.muis_set, "\t" + item.getSinger());
|
||||
helper.setText(R.id.muis_nickname, item.getNickname());
|
||||
|
||||
ImageUtils.loadHeadCC(item.getPoster(), helper.getView(R.id.muis_avatar));
|
||||
@@ -231,9 +233,9 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
TextView textView = helper.getView(R.id.muis_price);
|
||||
if (textView.getText().toString().equals("置顶")){
|
||||
if (textView.getText().toString().equals("置顶")) {
|
||||
MvpPre.upSong(item.getDid(), "2");
|
||||
}else {
|
||||
} else {
|
||||
|
||||
}
|
||||
if (listener != null) {
|
||||
@@ -250,10 +252,10 @@ public class MusicSongListFragment extends BaseMvpFragment<RequestPresenter, Fra
|
||||
}
|
||||
});
|
||||
|
||||
if (item.getIs_hot()==1){
|
||||
if (item.getIs_hot() == 1) {
|
||||
helper.setVisible(R.id.muis_sy, true);
|
||||
helper.setVisible(R.id.muis_price, true);
|
||||
}else {
|
||||
} else {
|
||||
helper.setVisible(R.id.muis_sy, false);
|
||||
helper.setVisible(R.id.muis_price, false);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.example.moduleroom.contacts.PublicScreenEaseChatContacts;
|
||||
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.listener.MessageListenerSingleton;
|
||||
import com.example.moduleroom.presenter.PublicScreenEaseChatPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
@@ -44,10 +45,11 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/17
|
||||
*@description: 聊天室
|
||||
* @author qx
|
||||
* @data 2025/6/17
|
||||
* @description: 聊天室
|
||||
*/
|
||||
public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEaseChatPresenter, RoomFragementTransEaseChatBinding>
|
||||
implements PublicScreenEaseChatContacts.View, MessageListenerSingleton.OnMessageReceivedListener {
|
||||
@@ -130,13 +132,13 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
onChatRoomViewCreation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
onChatRoomViewCreation();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,8 +215,8 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
easeChatAdapter.setOnItemClickListener((adapter, view, position) -> {
|
||||
EMMessageInfo item = easeChatAdapter.getItem(position);
|
||||
RoomMessageEvent emMessage = item.getEmMessage();
|
||||
if (emMessage.getText().getFromUserInfo()!=null) {
|
||||
RoomUserInfoFragment.show(emMessage.getRoomId(), emMessage.getText().getFromUserInfo().getUser_id() + "", emMessage.getText().getFromUserInfo().getPit_number(), getHostUser(emMessage.getText().getFromUserInfo()), false, getChildFragmentManager());
|
||||
if (emMessage.getText().getFromUserInfo() != null) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), emMessage.getText().getFromUserInfo().getUser_id() + "", emMessage.getText().getFromUserInfo().getPit_number(), getHostUser(roomInfoResp.getUser_info()), false,5, isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
// String userId = item.getEmMessage().getStringAttribute("user_id", "");
|
||||
// if (!TextUtils.isEmpty(userId)) {
|
||||
@@ -235,21 +237,35 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
mBinding.tvTabSystem.setOnClickListener(this::onClick);
|
||||
|
||||
}
|
||||
private int getHostUser(UserInfo item){
|
||||
if (item.getPit_number()!=null) {
|
||||
if (item.getPit_number().equals("9")) {
|
||||
if (item.getIs_host().equals("1")) {
|
||||
return 1;
|
||||
} else if (item.getIs_room_owner().equals("2")) {
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
|
||||
}
|
||||
private int isNumberWhether() {
|
||||
if (roomInfoResp.getUser_info().getPit_number()==9){
|
||||
return 1;
|
||||
}
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
private int getHostUser(RoomUserBean item) {
|
||||
if (item.getPit_number() != 0) {
|
||||
if (item.getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
} else if (item.getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (item.getIs_host() == 1) {
|
||||
return 3;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (item.getIs_room_owner() == 1){
|
||||
return 1;
|
||||
}else if (item.getIs_management() == 1){
|
||||
return 2;
|
||||
}else if (item.getIs_host() == 1){
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
MessageListenerSingleton.getInstance().removeOnMessageReceivedListener(this);
|
||||
@@ -470,62 +486,90 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
} else if (message.getMsgType() == 1002) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
} else if (message.getMsgType() == 123) {
|
||||
easeChatAdapter.clearData();
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}else if (message.getMsgType() == 1012) {
|
||||
} else if (message.getMsgType() == 1012) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
// easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
// scrollToBottomIfNeed();
|
||||
return;
|
||||
}else if (message.getMsgType() == 1014){
|
||||
} else if (message.getMsgType() == 1014) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType() == 1013){
|
||||
} else if (message.getMsgType() == 1013) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType() == 124){
|
||||
RoomMessageEvent.text text=GsonUtils.fromJson(message.getText().getText(),RoomMessageEvent.text.class);
|
||||
} else if (message.getMsgType() == 124) {
|
||||
RoomMessageEvent.text text = GsonUtils.fromJson(message.getText().getText(), RoomMessageEvent.text.class);
|
||||
MusicPlayBean musicPlayBean = new MusicPlayBean();
|
||||
musicPlayBean.setPosition(text.getPosition());
|
||||
EventBus.getDefault().post(musicPlayBean);
|
||||
return;
|
||||
}else if (message.getMsgType()==1007 || message.getMsgType()==1018 || message.getMsgType()==1006 || message.getMsgType()==1017){
|
||||
if (message.getText().getFromUserInfo().getUser_id()==SpUtil.getUserId()){
|
||||
} else if (message.getMsgType() == 1007 || message.getMsgType() == 1018 || message.getMsgType() == 1006 || message.getMsgType() == 1017) {
|
||||
if (message.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType()==1016){
|
||||
if (message.getText().getFromUserInfo().getUser_id()==SpUtil.getUserId()) {
|
||||
} else if (message.getMsgType() == 1016) {
|
||||
if (message.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType()==1026){
|
||||
} else if (message.getMsgType() == 1026) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}
|
||||
else if (message.getMsgType()==1003){
|
||||
} else if (message.getMsgType() == 1003 || message.getMsgType() == 1004) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}else if (message.getMsgType()==1015){
|
||||
} else if (message.getMsgType() == 1015) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
} else if (message.getMsgType() == 1021) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
} else if (message.getMsgType() == 1034) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
} else if (message.getMsgType() == 1000) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
} else if (message.getMsgType() == 1036 || message.getMsgType()==1037) {
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
} else if (message.getMsgType() == 1 || message.getMsgType() == 1005) {
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}else if (message.getMsgType()==1030 || message.getMsgType()==1033 || message.getMsgType()==1032){
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
// easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
// scrollToBottomIfNeed();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomJoinMount(RoomSettingEvent roomSetting) {
|
||||
if (roomSetting==null) {
|
||||
if (roomSetting == null) {
|
||||
easeChatAdapter.clearData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/10
|
||||
*@description:
|
||||
* @author qx
|
||||
* @data 2025/6/10
|
||||
* @description:
|
||||
*/
|
||||
public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, RoomRankingChildBinding> implements DataListContacts.View {
|
||||
|
||||
@@ -51,7 +51,8 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
private int dataType;
|
||||
private int rankType = 1;
|
||||
private RankingCharmListAdapter cAdapter;//魅力适配器
|
||||
private RankingWealthListAdapter wAdapter;//财富适配器
|
||||
private RankingCharmListAdapter wAdapter;//财富适配器
|
||||
// private RankingWealthListAdapter wAdapter;//财富适配器
|
||||
private CommonEmptyView commonEmptyView;
|
||||
|
||||
/**
|
||||
@@ -89,14 +90,16 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
mBinding.rankRecycleView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
mBinding.rankRecycleView.setAdapter(cAdapter);
|
||||
cAdapter.bindToRecyclerView(mBinding.rankRecycleView);
|
||||
MvpPre.getCharmListInfo(roomId, rankType + "", dataType + "", "1", "20");
|
||||
} else {
|
||||
wAdapter = new RankingWealthListAdapter();
|
||||
wAdapter = new RankingCharmListAdapter();
|
||||
mBinding.rankRecycleView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
mBinding.rankRecycleView.setAdapter(wAdapter);
|
||||
wAdapter.bindToRecyclerView(mBinding.rankRecycleView);
|
||||
MvpPre.getWealthListInfo(roomId, rankType + "", dataType + "", "1", "20");
|
||||
}
|
||||
// onRefreshEvent(null);
|
||||
MvpPre.getCharmListInfo(roomId, rankType+"", dataType+"","1","20");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +134,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
if (view.getId() == R.id.room_item_head) {
|
||||
WealthRankingResp.ListsBean item = wAdapter.getItem(position);
|
||||
// WealthRankingResp.ListsBean item = wAdapter.getItem(position);
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", item.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||
}
|
||||
}
|
||||
@@ -147,7 +150,6 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setNo1(CharmRankingResp listsBean) {
|
||||
ImageUtils.loadHeadCC(listsBean.getAvatar(), mBinding.roomRankTop1HeadIcon);
|
||||
@@ -176,7 +178,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
});
|
||||
}
|
||||
|
||||
private void setview(List<String> item, LinearLayout llContainer){
|
||||
private void setview(List<String> item, LinearLayout llContainer) {
|
||||
List<String> images = item; // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
@@ -214,11 +216,18 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
|
||||
@Override
|
||||
public void setCharmEmpty(List<CharmRankingResp> list) {
|
||||
cAdapter.setNewData( list);
|
||||
if (list != null) {
|
||||
if (cAdapter==null){
|
||||
wAdapter.setNewData(list);
|
||||
}else {
|
||||
cAdapter.setNewData(list);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWealthEmpty() {
|
||||
public void setWealthEmpty(List<CharmRankingResp> list) {
|
||||
wAdapter.setEmptyView(commonEmptyView);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,73 +1,232 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.adapter.RelationshipAdapter;
|
||||
import com.example.moduleroom.contacts.RoomUserContacts;
|
||||
import com.example.moduleroom.databinding.FragmentRelationshipBinding;
|
||||
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||
import com.example.moduleroom.presenter.RoomUserPresenter;
|
||||
import com.qxcm.moduleutil.base.BaseFragment;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.RelationCardBean;
|
||||
import com.qxcm.moduleutil.bean.RelationshipBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.zhpan.bannerview.constants.PageStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/13
|
||||
*@description: 关系卡和关系位的fragemnt
|
||||
* @author qx
|
||||
* @data 2025/6/13
|
||||
* @description: 关系卡和关系位的fragemnt
|
||||
*/
|
||||
public class RelationshipFragment extends BaseFragment<FragmentRelationshipBinding> {
|
||||
public class RelationshipFragment extends BaseMvpDialogFragment<RoomUserPresenter, FragmentRelationshipBinding> implements RoomUserContacts.View {
|
||||
|
||||
RelationshipAdapter adapter;
|
||||
public static RelationshipFragment newInstance() {
|
||||
private String userId;
|
||||
private int type;
|
||||
|
||||
public static void show(String user_id, int type, FragmentManager fragmentManager) {
|
||||
RelationshipFragment dialogFragment = new RelationshipFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("userId", user_id);
|
||||
args.putInt("type", type);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "RelationshipFragment");
|
||||
}
|
||||
|
||||
RelationshipFragment fragment = new RelationshipFragment();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
userId = getArguments().getString("userId");
|
||||
type = getArguments().getInt("type");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RoomUserPresenter bindPresenter() {
|
||||
return new RoomUserPresenter(this, getContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
List<RelationshipBean> list=new ArrayList<>();
|
||||
for (int i = 0; i < 3; i++){
|
||||
RelationshipBean relationshipBean=new RelationshipBean();
|
||||
relationshipBean.setAvatar("https://img2.baidu.com/it/u=3879116093,1671048885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500");
|
||||
relationshipBean.setAvatar2("https://img2.baidu.com/it/u=3879116093,1671048885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500");
|
||||
relationshipBean.setNickname("名称1");
|
||||
relationshipBean.setNickname2("名称2");
|
||||
relationshipBean.setRelation("兄弟");
|
||||
relationshipBean.setTime("5天");
|
||||
list.add(relationshipBean);
|
||||
}
|
||||
adapter=new RelationshipAdapter();
|
||||
mBinding.bannerViewPager
|
||||
.setScrollDuration(0)
|
||||
.setOrientation(ViewPager2.ORIENTATION_VERTICAL)
|
||||
.setAutoPlay(false)
|
||||
.setAdapter(adapter);
|
||||
MvpPre.relationCard(userId);
|
||||
|
||||
mBinding.bannerViewPager.setIndicatorVisibility(View.GONE);
|
||||
mBinding.bannerViewPager.create(list);
|
||||
// List<RelationshipBean> list=new ArrayList<>();
|
||||
// for (int i = 0; i < 3; i++){
|
||||
//// RelationshipBean relationshipBean=new RelationshipBean();
|
||||
//// relationshipBean.setAvatar("https://img2.baidu.com/it/u=3879116093,1671048885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500");
|
||||
//// relationshipBean.setAvatar2("https://img2.baidu.com/it/u=3879116093,1671048885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500");
|
||||
//// relationshipBean.setNickname("名称1");
|
||||
//// relationshipBean.setNickname2("名称2");
|
||||
//// relationshipBean.setRelation("兄弟");
|
||||
//// relationshipBean.setTime("5天");
|
||||
//// list.add(relationshipBean);
|
||||
// }
|
||||
// adapter=new RelationshipAdapter();
|
||||
// mBinding.bannerViewPager
|
||||
// .setScrollDuration(0)
|
||||
// .setOrientation(ViewPager2.ORIENTATION_VERTICAL)
|
||||
// .setAutoPlay(false)
|
||||
// .setAdapter(adapter);
|
||||
//
|
||||
// mBinding.bannerViewPager.setIndicatorVisibility(View.GONE);
|
||||
// mBinding.bannerViewPager.create(list);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.rvHostList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
adapter = new RelationshipAdapter();
|
||||
mBinding.rvHostList.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener(new RelationshipAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(View view, RelationshipBean data, int position) {
|
||||
if (view.getId() == R.id.im_zhid) {
|
||||
queren(1, data.getId(), "");
|
||||
} else if (view.getId() == R.id.im_shanchu) {
|
||||
queren(2, data.getId(), data.getDelete_me_coin());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void queren(int type, int id, String num) {
|
||||
if (type == 1) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"您确定要置顶本关系吗?",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
// MvpPre.applySong(roomId);
|
||||
MvpPre.topRelationCard(id + "");
|
||||
dismiss();
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
} else if (type == 2) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"您确定要删除本关系吗?解除关系需要" + num + "金币",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
// MvpPre.applySong(roomId);
|
||||
MvpPre.deleteRelationCard(id + "");
|
||||
dismiss();
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_relationship;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRoomUserInfo(UserInfo userInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downPit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kickOutRoom() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postHostAdd(String s, String type, String is_add) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMutePit(String pitNumber, String is_mute) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlackList() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userGuanzSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hostUserPit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveCoin() {
|
||||
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
adapter.setNewData(list.getZhenai());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String s) {
|
||||
MvpPre.relationCard(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String s) {
|
||||
MvpPre.relationCard(userId);
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@ public class RequestFragment extends BaseMvpFragment<RequestPresenter, FragmentR
|
||||
BaseQuickAdapter<Music, BaseViewHolder> adapter;
|
||||
private int page = 1;
|
||||
String input="";
|
||||
private int status;
|
||||
@Override
|
||||
public void songList(List<MusicSongBean> musicSongBeans) {
|
||||
|
||||
@@ -79,11 +80,12 @@ public class RequestFragment extends BaseMvpFragment<RequestPresenter, FragmentR
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public static RequestFragment newInstance(String roomId, int type) {
|
||||
public static RequestFragment newInstance(String roomId, int type,int status) {
|
||||
Bundle args = new Bundle();
|
||||
RequestFragment fragment = new RequestFragment();
|
||||
args.putString("roomId", roomId);
|
||||
args.putInt("type", type);
|
||||
args.putInt("status", status);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
@@ -110,6 +112,7 @@ public class RequestFragment extends BaseMvpFragment<RequestPresenter, FragmentR
|
||||
super.onAttach(context);
|
||||
roomId = getArguments().getString("roomId");
|
||||
type = getArguments().getInt("type");
|
||||
status = getArguments().getInt("status");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,7 +191,8 @@ public class RequestFragment extends BaseMvpFragment<RequestPresenter, FragmentR
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!AgoraManager.getInstance(getContext()).isBjMusic()) {
|
||||
if (status==1) {
|
||||
// if (!AgoraManager.getInstance(getContext()).isBjMusic()) {
|
||||
MvpPre.song(roomId, SpUtil.getUserId() + "", item.getSongCode() + "", item.getName(), item.getSinger(), item.getPoster(), String.valueOf(item.getDurationS()));
|
||||
} else {
|
||||
if (AgoraManager.getInstance(getContext()).getMusicList()==null) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.os.Looper;
|
||||
import android.util.TypedValue;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewStub;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
@@ -23,8 +24,11 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.activity.RoomActivity;
|
||||
import com.example.moduleroom.contacts.RoomAuctionContacts;
|
||||
@@ -58,7 +62,9 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -133,7 +139,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
LogUtils.e("lxj", "展示room时间:" + TimeUtils.date2String(new Date()));
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
}
|
||||
@@ -141,6 +147,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();
|
||||
|
||||
@@ -200,6 +207,15 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
auctionId = "";
|
||||
SpUtil.setAuctionId("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void getvjs() {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1 || roomInfoResp.getUser_info().getIs_management() == 1 || roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
} else {
|
||||
imActionJs.setVisibility(INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -213,6 +229,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.ivAuction1.setOnClickListener(this::onChock);
|
||||
mBinding.ivAuction2.setOnClickListener(this::onChock);
|
||||
mBinding.ivAuction3.setOnClickListener(this::onChock);
|
||||
mBinding.user4.setOnClickListener(this::onChock);
|
||||
mBinding.user5.setOnClickListener(this::onChock);
|
||||
mBinding.user6.setOnClickListener(this::onChock);
|
||||
getTextView();
|
||||
initOverlayButtons();
|
||||
steView(type);
|
||||
@@ -221,65 +240,90 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private void onChock(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.iv_jp) {
|
||||
// RoomAuction.AuctionUserBean auctionUserBean = roomInfoResp.getRoom_auction().getAuction_user();
|
||||
// CardRelationshipFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionUserBean.getUser_id(), type, getActivity().getSupportFragmentManager());
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getUser_id()));
|
||||
userInfo.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
||||
userInfo.setAvatar(roomInfoResp.getRoom_auction().getAuction_user().getAvatar());
|
||||
userInfo.setAuction_id(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id());
|
||||
userInfo.setPit_number("888");
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), getParentFragmentManager());
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), 1, getParentFragmentManager());
|
||||
|
||||
} else if (id == R.id.room_make_wheat) {
|
||||
if (!wheatView.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView.getUserId(), wheatView.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView.getUserId(), wheatView.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomInfoResp.getRoom_info().getRoom_id(), "9");
|
||||
}
|
||||
} else if (id == R.id.room_make_wheat2) {
|
||||
|
||||
if (wheatView2.getUserId().equals("")) {
|
||||
if (wheatView.getUserId() != null && wheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", getChildFragmentManager());
|
||||
if ((wheatView.getUserId() != null && wheatView.getUserId().equals(SpUtil.getUserId() + "") || getHostUser() < 4)) {
|
||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
}
|
||||
} else {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id()), getChildFragmentManager());
|
||||
|
||||
}
|
||||
} else if (id == R.id.im_action_ys) {
|
||||
} else if (id == R.id.im_action_js) {//延时
|
||||
MvpPre.auctionDelay(SpUtil.getauctionId());
|
||||
} else if (id == R.id.im_action_js) {
|
||||
MvpPre.auctionEnd(SpUtil.getauctionId());
|
||||
} else if (id == R.id.im_action_ys) {//结束
|
||||
dialogEnd();
|
||||
} else if (id == R.id.bangdan) {//出价榜单
|
||||
BidListDialogFragment.newInstance(SpUtil.getauctionId()).show(getChildFragmentManager(), "BidListDialogFragment");
|
||||
} else if (id == R.id.iv_auction1) {
|
||||
if (mBinding.ivAuction1.getUserId() != null && !mBinding.ivAuction1.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction1.getUserId(), mBinding.ivAuction1.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction1.getUserId(), mBinding.ivAuction1.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.iv_auction2) {
|
||||
if (mBinding.ivAuction2.getUserId() != null && !mBinding.ivAuction2.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction2.getUserId(), mBinding.ivAuction2.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction2.getUserId(), mBinding.ivAuction2.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.iv_auction3) {
|
||||
if (mBinding.ivAuction3.getUserId() != null && !mBinding.ivAuction3.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction3.getUserId(), mBinding.ivAuction3.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction3.getUserId(), mBinding.ivAuction3.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.user_4) {
|
||||
if (auctionList != null && auctionList.size() > 3) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionList.get(3).getUser_id(), "", getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
|
||||
} else if (id == R.id.user_5) {
|
||||
if (auctionList != null && auctionList.size() > 4) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionList.get(4).getUser_id(), "", getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.user_6) {
|
||||
if (auctionList != null && auctionList.size() > 5) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), auctionList.get(5).getUser_id(), "", getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void getTextView() {
|
||||
int defaultColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9); // 原亲密拍颜色
|
||||
int selectedColor = Color.WHITE; // 原真爱拍颜色
|
||||
// int defaultColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9); // 原亲密拍颜色
|
||||
// int selectedColor = Color.WHITE; // 原真爱拍颜色
|
||||
// float defaultSize = 24f; // 亲密拍默认字体大小
|
||||
// float selectedSize = 16f; // 真爱拍默认字体大小
|
||||
// if (type == 1) {
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
// }else {
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
// }
|
||||
//
|
||||
//
|
||||
|
||||
int defaultColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9); // 亲密拍默认颜色
|
||||
int selectedColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_white); // 切换到真爱拍的颜色
|
||||
float defaultSize = 24f; // 亲密拍默认字体大小
|
||||
float selectedSize = 16f; // 真爱拍默认字体大小
|
||||
if (type == 1) {
|
||||
toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
}else {
|
||||
toggleTextStyles(mBinding.zhenai, mBinding.qinmi, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
}
|
||||
int clickedColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_BB8BE2); // 点击后的颜色(BB8BE2)
|
||||
|
||||
// 默认是亲密拍
|
||||
if (type == 2) {
|
||||
toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, clickedColor, defaultSize, selectedSize, type);
|
||||
} else if (type == 1) {
|
||||
toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, clickedColor, defaultSize, selectedSize, type);
|
||||
}
|
||||
mBinding.zhenai.setOnClickListener(v -> {
|
||||
if (wheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
// 判断 wheatView2 是否有人
|
||||
@@ -310,7 +354,22 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void dialogEnd() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"您确定要结束本次拍卖吗?",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre.auctionEnd(SpUtil.getauctionId(), roomInfoResp.getRoom_info().getRoom_id());
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private void queren(int newType) {
|
||||
@@ -331,8 +390,13 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
|
||||
private void steView(int type) {
|
||||
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) mBinding.tvPB.getLayoutParams();
|
||||
if (type == 1) {
|
||||
mBinding.tvPB.setVisibility(VISIBLE);
|
||||
|
||||
layoutParams.setMargins(0, 35, 0, 0);
|
||||
mBinding.tvPB.setLayoutParams(layoutParams);
|
||||
|
||||
mBinding.ccc.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_bj);
|
||||
mBinding.pB.setImageResource(com.qxcm.moduleutil.R.mipmap.za_t);
|
||||
mBinding.btnRelation.setImageResource(com.qxcm.moduleutil.R.mipmap.za_g);
|
||||
@@ -359,6 +423,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.clBj3.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_maiw);
|
||||
|
||||
} else {
|
||||
layoutParams.setMargins(0, 15, 0, 0);
|
||||
mBinding.tvPB.setLayoutParams(layoutParams);
|
||||
mBinding.ccc.setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_rounded_corner);
|
||||
mBinding.pB.setImageResource(com.qxcm.moduleutil.R.mipmap.qm_b);
|
||||
mBinding.btnRelation.setImageResource(com.qxcm.moduleutil.R.mipmap.guanx);
|
||||
@@ -368,17 +434,17 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.btnTime.setImageResource(com.qxcm.moduleutil.R.mipmap.shij);
|
||||
mBinding.tvTimetg.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_FF999999));
|
||||
mBinding.ivJp.setImageResource(com.qxcm.moduleutil.R.mipmap.room_auction_jp);
|
||||
mBinding.avatar4.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.avatar5.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.avatar6.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.tvPB.setVisibility(GONE);
|
||||
mBinding.avatar4.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
mBinding.avatar5.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
mBinding.avatar6.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
mBinding.tvPB.setVisibility(VISIBLE);
|
||||
if (wheatView.getUserId() == null || wheatView.getUserId().isEmpty() || wheatView.getUserId().equals("") || wheatView.getUserId().equals("0")) {
|
||||
wheatView.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
wheatView.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default, 0, "0");
|
||||
}
|
||||
wheatView2.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction1.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction2.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction3.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction1.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default, 0, "0");
|
||||
mBinding.ivAuction2.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default, 0, "0");
|
||||
mBinding.ivAuction3.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default, 0, "0");
|
||||
mBinding.clBj1.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj1);
|
||||
mBinding.clBj2.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj2);
|
||||
mBinding.clBj3.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj3);
|
||||
@@ -387,10 +453,10 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
|
||||
private void setparams() {
|
||||
ConstraintLayout.LayoutParams params =
|
||||
(ConstraintLayout.LayoutParams) wheatView2.getLayoutParams();
|
||||
params.setMargins(0, 100, 0, 0);
|
||||
wheatView2.setLayoutParams(params);
|
||||
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) wheatView2.getLayoutParams();
|
||||
// ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) wheatView2.getLayoutParams();
|
||||
layoutParams.setMargins(0, 30, 0, 0);
|
||||
wheatView2.setLayoutParams(layoutParams);
|
||||
|
||||
|
||||
}
|
||||
@@ -409,11 +475,23 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
return 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -447,41 +525,76 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
if (messageEvent.getMsgType() == 1003) {//上麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean(messageEvent));
|
||||
imActionJs.setVisibility(View.VISIBLE);
|
||||
imActionYs.setVisibility(View.VISIBLE);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
imActionJs.setVisibility(View.VISIBLE);
|
||||
imActionYs.setVisibility(View.VISIBLE);
|
||||
|
||||
parentFragment.updateWheatStatus(getPitBean(messageEvent), 9, true, true);
|
||||
// parentFragment.setRoleType(3, 9);
|
||||
// parentFragment.switchMic(2);
|
||||
} else {
|
||||
getvjs();
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// parentFragment.setRoleType(3, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
}
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1004) {
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean2(messageEvent, "9"));
|
||||
imActionJs.setVisibility(GONE);
|
||||
getvjs();
|
||||
imActionYs.setVisibility(GONE);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
wheatView2.setData(getPitBean2(messageEvent, "888"));
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
|
||||
// if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
// parentFragment.setRoleType(0, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
} else if (messageEvent.getMsgType() == 1022) {
|
||||
|
||||
if (messageEvent.getText().getType() == 1) {
|
||||
if (messageEvent.getText().getType() == 1) {//拍卖位上麦
|
||||
if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
wheatView2.setData(getPitBean(messageEvent));
|
||||
imActionJs.setVisibility(GONE);
|
||||
getvjs();
|
||||
imActionYs.setVisibility(GONE);
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(3, 888);
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(3, 888);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
CardRelationshipFragment.show(roomInfoResp.getRoom_info().getRoom_id(), SpUtil.getUserId() + "", type + "", getActivity().getSupportFragmentManager());
|
||||
}
|
||||
} else if (messageEvent.getText().getType() == 2) {
|
||||
} else if (messageEvent.getText().getType() == 2) {//拍卖位下麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean2(messageEvent, "9"));
|
||||
assert parentFragment != null;
|
||||
parentFragment.setRoleType(0, 9);
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
wheatView2.setData(getPitBean2(messageEvent, "888"));
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
if(messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
// parentFragment.getVoiceStatus(null,null,wheatView2.pitBean.getUser_id());
|
||||
}
|
||||
}
|
||||
yinc();
|
||||
@@ -493,7 +606,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
imActionYs.setVisibility(VISIBLE);
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
} else {
|
||||
imActionJs.setVisibility(GONE);
|
||||
getvjs();
|
||||
imActionYs.setVisibility(GONE);
|
||||
}
|
||||
if (messageEvent.getText().getAuction_user().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
@@ -517,16 +630,37 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
SpUtil.setAuctionId("");
|
||||
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
imActionJs.setVisibility(INVISIBLE);
|
||||
getvjs();
|
||||
releaseCountDownTimer();
|
||||
auctionList = null;
|
||||
gexList();
|
||||
steView(type);
|
||||
} else if (messageEvent.getMsgType() == 1026) {//主持延迟
|
||||
countDownTime(messageEvent.getText().getDuration());
|
||||
} else if (messageEvent.getMsgType() == 1027) {
|
||||
type = messageEvent.getText().getType();
|
||||
getTextView();
|
||||
steView(type);
|
||||
} else if (messageEvent.getMsgType() == 1005) {
|
||||
if (mBinding.roomMakeWheat2.getUserId().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
|
||||
mBinding.tvPB.setText(messageEvent.getText().getToUserInfo().getCharm());
|
||||
} else {
|
||||
if (mBinding.ivAuction1 != null && mBinding.ivAuction1.getUserId() != null) {
|
||||
if (mBinding.ivAuction1.getUserId().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
|
||||
RoomMakeWheatView wheatView = mBinding.ivAuction1;
|
||||
wheatView.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
wheatView.setData(wheatView.pitBean);
|
||||
} else if (mBinding.ivAuction2.getUserId().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
|
||||
RoomMakeWheatView wheatView = mBinding.ivAuction2;
|
||||
wheatView.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
wheatView.setData(wheatView.pitBean);
|
||||
} else if (mBinding.ivAuction3.getUserId().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
|
||||
RoomMakeWheatView wheatView = mBinding.ivAuction3;
|
||||
wheatView.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
wheatView.setData(wheatView.pitBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -545,7 +679,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
private void yinc() {
|
||||
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||
imActionJs.setVisibility(INVISIBLE);
|
||||
getvjs();
|
||||
imActionYs.setVisibility(INVISIBLE);
|
||||
mBinding.tvDjTime.setVisibility(INVISIBLE);
|
||||
mBinding.tvRelation.setText("关系");
|
||||
@@ -553,6 +687,14 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.tvGift.setText("礼物");
|
||||
mBinding.btnGift.setImageResource(com.qxcm.moduleutil.R.mipmap.liwu);
|
||||
|
||||
closeCardRelationshipFragment();//这是当抱麦上的人没有选择关系后,主持有权利结束这个游戏,并且关闭弹框
|
||||
}
|
||||
|
||||
public void closeCardRelationshipFragment() {
|
||||
CardRelationshipFragment fragment = (CardRelationshipFragment) requireActivity().getSupportFragmentManager().findFragmentByTag("CardRelationshipFragment");
|
||||
if (fragment != null) {
|
||||
fragment.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
private void gexList() {
|
||||
@@ -566,6 +708,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
pitBean.setUser_id(auctionListBean.getUser_id());
|
||||
pitBean.setNickname(auctionListBean.getNickname());
|
||||
pitBean.setAvatar(auctionListBean.getAvatar());
|
||||
pitBean.setCharm(auctionListBean.getCharm());
|
||||
|
||||
if (j == 1) {
|
||||
pitBean.setPit_number("111");
|
||||
@@ -583,10 +726,29 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.nickName3.setText(pitBean.getNickname());
|
||||
wheatView.setData(pitBean);
|
||||
} else if (j == 4) {
|
||||
// if (auctionListBean.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
// if (parentFragment != null) {
|
||||
// parentFragment.setRoleType(3, 444);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
// }
|
||||
ImageUtils.loadHeadCC(auctionListBean.getAvatar(), mBinding.avatar4);
|
||||
|
||||
} else if (j == 5) {
|
||||
// if (auctionListBean.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
// if (parentFragment != null) {
|
||||
// parentFragment.setRoleType(3, 555);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
// }
|
||||
ImageUtils.loadHeadCC(auctionListBean.getAvatar(), mBinding.avatar5);
|
||||
} else if (j == 6) {
|
||||
// if (auctionListBean.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
// if (parentFragment != null) {
|
||||
// parentFragment.setRoleType(3, 666);
|
||||
// parentFragment.switchMic(2);
|
||||
// }
|
||||
// }
|
||||
ImageUtils.loadHeadCC(auctionListBean.getAvatar(), mBinding.avatar6);
|
||||
}
|
||||
|
||||
@@ -595,20 +757,34 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
RoomMakeWheatView wheatView = mBinding.ivAuction1;
|
||||
mBinding.nickName1.setText("一号麦");
|
||||
wheatView.setData(getPitBean2(null, "111"));
|
||||
|
||||
RoomMakeWheatView wheatView2 = mBinding.ivAuction2;
|
||||
mBinding.nickName2.setText("二号麦");
|
||||
wheatView2.setData(getPitBean2(null, "222"));
|
||||
|
||||
RoomMakeWheatView wheatView3 = mBinding.ivAuction3;
|
||||
mBinding.nickName3.setText("三号麦");
|
||||
wheatView3.setData(getPitBean2(null, "333"));
|
||||
|
||||
|
||||
mBinding.avatar4.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
mBinding.avatar5.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
mBinding.avatar6.setImageResource(com.qxcm.moduleutil.R.mipmap.room_ic_wheat_default);
|
||||
// mBinding.ivAuction1.setData(getPitBean2(null));
|
||||
// mBinding.ivAuction2.setData(getPitBean2(null));
|
||||
// mBinding.ivAuction3.setData(getPitBean2(null));
|
||||
|
||||
}
|
||||
if (parentFragment != null) {
|
||||
parentFragment.getVoiceStatus(auctionUserBean, auctionList, mBinding.roomMakeWheat.pitBean.getUser_id());
|
||||
|
||||
// parentFragment.setRoleType(3, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 2025/6/30 竞拍失败的dialog
|
||||
|
||||
// TODO: 2025/6/30 竞拍失败的dialog
|
||||
public void showCountDownDialog(Context context) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
View dialogView = getLayoutInflater().inflate(R.layout.dialog_with_countdown, null);
|
||||
@@ -660,7 +836,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
try {
|
||||
if (time <= 0) {
|
||||
setTime(0);
|
||||
|
||||
releaseCountDownTimer();
|
||||
return;
|
||||
}
|
||||
@@ -681,13 +856,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
int time1 = (int) (millisUntilFinished / 1000);
|
||||
setTime(time1);
|
||||
remainingTime = time1;
|
||||
// if (time1 <= 10) {
|
||||
// mBinding.tvDjs.setVisibility(View.VISIBLE);
|
||||
// mBinding.tvDjs.setText(time1 + "");
|
||||
//// mBinding.tvDjs.setVisibility(GONE);
|
||||
// } else {
|
||||
// mBinding.tvDjs.setVisibility(GONE);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -728,7 +896,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
if (mCountDownTimer != null) {
|
||||
mCountDownTimer.cancel();
|
||||
mCountDownTimer = null;
|
||||
mBinding.tvDjTime.setVisibility(GONE);
|
||||
mBinding.tvDjTime.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -800,24 +968,17 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
* @param defaultSize 默认字体大小(sp)
|
||||
* @param selectedSize 点击后选中字体大小(sp)
|
||||
*/
|
||||
public void toggleTextStyles(TextView qinmi, TextView zhenai,
|
||||
int defaultColor, int selectedColor,
|
||||
float defaultSize, float selectedSize, int type) {
|
||||
|
||||
boolean isDefaultState = qinmi.getCurrentTextColor() == defaultColor;
|
||||
|
||||
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);
|
||||
qinmi.setTextSize(TypedValue.COMPLEX_UNIT_SP, selectedSize);
|
||||
|
||||
zhenai.setTextColor(defaultColor);
|
||||
zhenai.setTextColor(clickedColor);
|
||||
zhenai.setTextSize(TypedValue.COMPLEX_UNIT_SP, defaultSize);
|
||||
} else {
|
||||
// 切换回默认样式
|
||||
} else if (type == 2) {
|
||||
// 默认亲密拍样式
|
||||
qinmi.setTextColor(defaultColor);
|
||||
qinmi.setTextSize(TypedValue.COMPLEX_UNIT_SP, defaultSize);
|
||||
|
||||
zhenai.setTextColor(selectedColor);
|
||||
zhenai.setTextSize(TypedValue.COMPLEX_UNIT_SP, selectedSize);
|
||||
}
|
||||
|
||||
@@ -284,6 +284,7 @@ public class RoomBackgroundDialogFragment extends BaseMvpDialogFragment<RoomBack
|
||||
listWithAddBtn.addAll(myBgList);
|
||||
mAdapter.setNewData(listWithAddBtn); // 更新 adapter 数据并刷新
|
||||
}
|
||||
mAdapter.setNewData(publicBgList);
|
||||
}
|
||||
|
||||
private static class MyAdapter extends BaseQuickAdapter<RoomBgBean.RoomBg, BaseViewHolder> {
|
||||
|
||||
@@ -131,13 +131,18 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
if (roomInfoResp.getCp_user() != null) {
|
||||
cpUserBean = roomInfoResp.getCp_user();
|
||||
}
|
||||
|
||||
}
|
||||
private boolean isLandscape;
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).changeBackground(com.qxcm.moduleutil.R.mipmap.cabin_bj);
|
||||
((RoomActivity) getActivity()).setvisibTop(false);
|
||||
}
|
||||
}
|
||||
private boolean isLandscape;
|
||||
|
||||
|
||||
private void enableNotifications() {
|
||||
if (NotificationManagerCompat.from(requireContext()).areNotificationsEnabled()) {
|
||||
@@ -251,7 +256,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
userInfo.setNickname(roomPitBean.getNickname());
|
||||
userInfo.setAvatar(roomPitBean.getAvatar());
|
||||
userInfo.setPit_number("");
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), getParentFragmentManager());
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(),0, getParentFragmentManager());
|
||||
|
||||
}
|
||||
});
|
||||
@@ -266,6 +271,7 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
joinChannel();
|
||||
isMicPlace = true;
|
||||
mBinding.im3.setImageResource(com.qxcm.moduleutil.R.mipmap.clogs_car);
|
||||
|
||||
} else {
|
||||
isMicPlace = false;
|
||||
ToastUtils.show("将停止屏幕共享");
|
||||
@@ -277,11 +283,18 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
|
||||
if (roomInfoResp.getRoom_owner().getUser_id().equals(SpUtil.getUserId()+"")){
|
||||
mBinding.im3.setVisibility(VISIBLE);
|
||||
setvkk(false);
|
||||
}else {
|
||||
mBinding.im3.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void setvkk(boolean isShow){
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setDiany(isShow);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFullscreen = false;
|
||||
|
||||
|
||||
@@ -292,7 +305,6 @@ public class RoomCabinFragment extends BaseRoomFragment<RoomCabinPresenter, Room
|
||||
AgoraManager.getInstance(getActivity()).ClientRole(true);
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
AgoraManager.getInstance(getActivity()).setLocalAudioEnabled(true,SpUtil.getUserId()+"");
|
||||
|
||||
isShow = false;
|
||||
} else {
|
||||
mBinding.im1.setImageResource(com.qxcm.moduleutil.R.mipmap.op_m);
|
||||
|
||||
@@ -35,8 +35,8 @@ import java.util.List;
|
||||
*/
|
||||
public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresenter, FragmentRoomChartsBinding> implements RoomChartsContacts.View {
|
||||
private String mRoomId;
|
||||
public static final int TYPE_CHARM = 1;//魅力榜
|
||||
public static final int TYPE_WEALTH = 2;//财富榜
|
||||
public static final int TYPE_CHARM = 1;//财富榜
|
||||
public static final int TYPE_WEALTH = 2;//魅力榜
|
||||
private int type = TYPE_CHARM;
|
||||
private int childType = RankingChildFragment.TYPE_DATA;
|
||||
|
||||
@@ -141,13 +141,13 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
||||
public void onViewClicked(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.tv_charm) {
|
||||
type = TYPE_CHARM;//工会
|
||||
type = TYPE_WEALTH;//魅力
|
||||
mBinding.tvCharm.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.white));
|
||||
mBinding.tvWealth.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.color_DADADA));
|
||||
mBinding.tvCharm.setTextSize(18);
|
||||
mBinding.tvWealth.setTextSize(16);
|
||||
} else {
|
||||
type = TYPE_WEALTH;//财富
|
||||
type = TYPE_CHARM;//财富
|
||||
mBinding.tvWealth.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.white));
|
||||
mBinding.tvCharm.setTextColor(getResources().getColor(com.qxcm.moduleutil.R.color.color_DADADA));
|
||||
mBinding.tvWealth.setTextSize(18);
|
||||
|
||||
@@ -1,31 +1,29 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.projection.MediaProjection;
|
||||
import android.media.projection.MediaProjectionManager;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import android.util.Log;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.blankj.utilcode.util.FragmentUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.activity.RoomActivity;
|
||||
import com.example.moduleroom.contacts.RoomContacts;
|
||||
import com.example.moduleroom.databinding.FragmentRoomBinding;
|
||||
import com.example.moduleroom.dialog.RequestDialogFragment;
|
||||
import com.example.moduleroom.dialog.RoomGiftDialogFragment;
|
||||
import com.example.moduleroom.dialog.RoomMessageDialogFragment;
|
||||
import com.example.moduleroom.dialog.RoomPkDialogFragment;
|
||||
import com.example.moduleroom.dialog.RoomSettingFragment;
|
||||
import com.example.moduleroom.dialog.SoundEffectsDialogFragment;
|
||||
@@ -36,22 +34,28 @@ import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.room.RoomPitBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUserBean;
|
||||
import com.qxcm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.qxcm.moduleutil.event.RoomWheatEvent;
|
||||
import com.qxcm.moduleutil.event.UnreadCountEvent;
|
||||
import com.qxcm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.qxcm.moduleutil.rtc.AgoraManager;
|
||||
import com.qxcm.moduleutil.utils.GsonUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -117,6 +121,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (!EventBus.getDefault().isRegistered(this)) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
LogUtils.e("lxj", "创建room时间:" + TimeUtils.date2String(new Date()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -132,11 +137,57 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// } else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
// FragmentUtils.add(getChildFragmentManager(), RoomKtvFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 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);
|
||||
// }
|
||||
|
||||
loadSubFragment();
|
||||
|
||||
|
||||
V2TIMManager.getConversationManager().getTotalUnreadMessageCount(new V2TIMValueCallback<Long>() {
|
||||
@Override
|
||||
public void onSuccess(Long aLong) {
|
||||
if (aLong == 0) {
|
||||
mBinding.ivMessageDot.setVisibility(View.GONE);
|
||||
mBinding.ivMessageDot.setText("0");
|
||||
} else {
|
||||
mBinding.ivMessageDot.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBinding.ivMessageDot.setText(String.valueOf(aLong));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMessageEvent(UnreadCountEvent messageEvent) {
|
||||
if (messageEvent.getALong() == 0) {
|
||||
mBinding.ivMessageDot.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.ivMessageDot.setVisibility(View.VISIBLE);
|
||||
mBinding.ivMessageDot.setText(String.valueOf(messageEvent.getALong()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 定义一个可被外部调用的方法
|
||||
public void refreshData(RoomInfoResp resp) {
|
||||
// 使用传入的参数刷新界面或逻辑
|
||||
@@ -146,7 +197,9 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
|
||||
private void loadSubFragment() {
|
||||
|
||||
if (mRoomInfoResp == null || mRoomInfoResp.getRoom_info() == null) return;
|
||||
|
||||
replaceNestedFragment(PublicScreenEaseChatFragment.newInstance(mRoomInfoResp), R.id.ease_container);
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("1")) {
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
@@ -164,14 +217,14 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
replaceNestedFragment(RoomCabinFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
setviewyc();
|
||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("3")){
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("3")) {
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
replaceNestedFragment(SingSongFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
// replaceNestedFragment(RoomPkFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
replaceNestedFragment(RoomKtvFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
}
|
||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("4")){
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("4")) {
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
replaceNestedFragment(SingSongFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
// replaceNestedFragment(RoomPkFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
@@ -183,20 +236,30 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
// FragmentUtils.add(getChildFragmentManager(), PublicScreenEaseChatFragment.newInstance(mRoomInfoResp), R.id.ease_container);
|
||||
mBinding.inputMenu1.performClick();
|
||||
|
||||
instView();
|
||||
setview();
|
||||
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() != 0) {
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
switchMic(2);
|
||||
} else {
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
///这是在进入电影放的时候,隐藏下面的和排麦视图
|
||||
public void setviewyc() {
|
||||
mBinding.ivSoundEffects.setVisibility(View.GONE);
|
||||
mBinding.ivWheatFeeding.setVisibility(View.GONE);
|
||||
mBinding.clFirstCharge.setVisibility(View.GONE);
|
||||
mBinding.rlMore.setVisibility(View.GONE);
|
||||
mBinding.rlMisc.setVisibility(View.GONE);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
mBinding.rlSett.setVisibility(View.GONE);
|
||||
mBinding.rlVoive.setVisibility(View.GONE);
|
||||
mBinding.rlGift.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void replaceNestedFragment(@NonNull Fragment newFragment, int containerId) {
|
||||
@@ -240,20 +303,31 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomBean messageEvent) {
|
||||
mRoomInfoResp.setRoom_info(messageEvent);
|
||||
public void setview() {//这里是当进入电影放房的时候,如果是排麦模式,并且不是电影放的时候,就隐藏排麦视图
|
||||
if (mRoomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1") && !mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
mBinding.clFirstCharge.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.clFirstCharge.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void instView() {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomBean messageEvent) {
|
||||
mRoomInfoResp.setRoom_info(messageEvent);
|
||||
setview();
|
||||
}
|
||||
|
||||
private void instView() {//隐藏视图
|
||||
|
||||
if (mRoomInfoResp.getUser_info().getPit_number() != 0) {
|
||||
aBoolean = false;
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
mBinding.rlMic.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
aBoolean = true;
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
}
|
||||
int pitNumber = mRoomInfoResp.getUser_info().getPit_number();
|
||||
int roleType;
|
||||
@@ -279,13 +353,25 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
mBinding.ivSoundEffects.setVisibility(View.GONE);
|
||||
}
|
||||
// }
|
||||
if (mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && mRoomInfoResp.getUser_info().getPit_number() ==9
|
||||
&&mRoomInfoResp.getRoom_info().getType_id().equals("1") && mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
if (mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "") && mRoomInfoResp.getUser_info().getPit_number() == 9
|
||||
&& !mRoomInfoResp.getRoom_info().getType_id().equals("2") && !mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
mBinding.rlMore.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
|
||||
} else {
|
||||
mBinding.rlMore.setVisibility(View.GONE);
|
||||
}
|
||||
String countText = String.valueOf(mRoomInfoResp.getRoom_info().getQueue_number());
|
||||
String fullText = countText + "人排队";
|
||||
|
||||
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(fullText);
|
||||
spannableStringBuilder.setSpan(
|
||||
new ForegroundColorSpan(ContextCompat.getColor(getContext(), com.qxcm.moduleutil.R.color.colorPrimary)), // 设置颜色为红色
|
||||
0, // 起始位置
|
||||
countText.length(), // 结束位置
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
|
||||
mBinding.tvFirst.setText(spannableStringBuilder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -296,10 +382,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
mBinding.rlGift.setOnClickListener(this::onViewClicked);
|
||||
mBinding.ivSoundEffects.setOnClickListener(this::onViewClicked);
|
||||
mBinding.ivWheatFeeding.setOnClickListener(this::onViewClicked);
|
||||
mBinding.clFirstCharge.setOnClickListener(this::onViewClicked);
|
||||
mBinding.rlMic.setOnClickListener(this::onViewClicked);
|
||||
mBinding.rlSett.setOnClickListener(this::onViewClicked);
|
||||
mBinding.rlVoive.setOnClickListener(this::onViewClicked);
|
||||
mBinding.rlMore.setOnClickListener(this::onViewClicked);
|
||||
mBinding.rlMessage.setOnClickListener(this::onViewClicked);
|
||||
}
|
||||
|
||||
public void mus() {
|
||||
@@ -327,16 +415,24 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
queren();
|
||||
} else {
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, getChildFragmentManager());
|
||||
RequestDialogFragment.show(roomId, mRoomInfoResp, 1, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.rl_gift) {
|
||||
RoomGiftDialogFragment.show(mRoomInfoResp, null, roomId, getChildFragmentManager());
|
||||
} else if (id == R.id.rl_gift) {//礼物
|
||||
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) {
|
||||
showWheatFeedingDialog(roomId, (mRoomInfoResp.getUser_info().getIs_room_owner() == 1 || mRoomInfoResp.getUser_info().getIs_host() == 1 || mRoomInfoResp.getUser_info().getIs_management() == 1) ? 1 : 2);
|
||||
} else if (id == R.id.iv_wheat_feeding) {//点击上麦操作
|
||||
if (mRoomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")) {
|
||||
// WheatFeedingDialogFragment.show(roomId, getChildFragmentManager());
|
||||
showWheatFeedingDialog(roomId, mRoomInfoResp.getUser_info().getPit_number() == 9 ? 1 : 2);
|
||||
// showWheatFeedingDialog(roomId, mRoomInfoResp.getUser_info().getPit_number() == 9 ? 1 : 2);
|
||||
if (aBoolean) {
|
||||
MvpPre.applyPit(roomId, "");
|
||||
// aBoolean = false;
|
||||
} else {
|
||||
MvpPre.downPit(roomId, "");
|
||||
// aBoolean = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (aBoolean) {
|
||||
@@ -350,7 +446,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
} else if (id == R.id.rl_mic) {
|
||||
if (mRoomInfoResp.getUser_info().getIs_mute_pit().equals("1")) {
|
||||
if (mRoomInfoResp.getUser_info().getIs_mute_pit() != null && mRoomInfoResp.getUser_info().getIs_mute_pit().equals("1")) {
|
||||
ToastUtils.show("您被禁麦了");
|
||||
} else {
|
||||
if (isSwith) {
|
||||
@@ -370,8 +466,11 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
voive = true;
|
||||
}
|
||||
AgoraManager.getInstance(getActivity()).muteSpeaker(!voive);
|
||||
}else if (id == R.id.rl_more){//点击PK
|
||||
RoomPkDialogFragment.newInstance(roomId,SpUtil.getUserId()+"",mRoomInfoResp.getRoom_info().getIs_pk()).show(getChildFragmentManager(),"RoomPkDialogFragment");
|
||||
} else if (id == R.id.rl_more) {//点击PK
|
||||
RoomPkDialogFragment.newInstance(roomId, SpUtil.getUserId() + "", mRoomInfoResp.getRoom_info().getIs_pk()).show(getChildFragmentManager(), "RoomPkDialogFragment");
|
||||
} else if (id == R.id.rl_message) {
|
||||
RoomMessageDialogFragment.show(getChildFragmentManager());
|
||||
// RoomMessageDialogFragment.newInstance(roomId, SpUtil.getUserId() + "", mRoomInfoResp.getRoom_info().getIs_pk()).show(getChildFragmentManager(), "RoomMessageDialogFragment");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +501,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
},false,0).show();
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
public void showWheatFeedingDialog(String roomId, int displayMode) {
|
||||
@@ -501,6 +600,87 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUserCharm() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
if (list != null) {
|
||||
for (UserOnlineStatusBean userOnlineStatusBean : list) {
|
||||
EventBus.getDefault().postSticky(userOnlineStatusBean);
|
||||
EventBus.getDefault().post(list);
|
||||
}
|
||||
|
||||
// for (int i = 0; i < list.size(); i++) {
|
||||
// for (int j = 0; j < mRoomInfoResp.getRoom_info().getPit_list().size(); j++) {
|
||||
// if (list.get(i).getUser_id().equals( mRoomInfoResp.getRoom_info().getPit_list().get(j).getUser_id())) {
|
||||
// mRoomInfoResp.getRoom_info().getPit_list().get(j).setIs_online(list.get(i).getIs_online());
|
||||
// if (list.get(i).getIs_online() == 1 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId())){
|
||||
// AgoraManager.getInstance(getActivity()).ClientRole(true);
|
||||
// }
|
||||
// EventBus.getDefault().post(mRoomInfoResp.getRoom_info().getPit_list().get(j));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// EventBus.getDefault().post(mRoomInfoResp);
|
||||
// refreshData(mRoomInfoResp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean haveMe = false;
|
||||
|
||||
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 (auctionListBeans.get(i).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
haveMe = true;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if(auctionUserBean!=null){
|
||||
if (auctionUserBean.getUser_id().equals(SpUtil.getUserId() + "")){//判断我是不是被拍卖者
|
||||
haveMe = true;
|
||||
}
|
||||
}
|
||||
if (user_id.equals(SpUtil.getUserId() + "")) {
|
||||
haveMe = true;
|
||||
}
|
||||
|
||||
if (!haveMe){
|
||||
AgoraManager.getInstance(getContext()).ClientRole(false);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, SpUtil.getUserId() + "");
|
||||
// switchMic(2);
|
||||
|
||||
}else {
|
||||
mBinding.rlMic.setVisibility(View.VISIBLE);
|
||||
if (AgoraManager.getInstance(getContext()).isLocalAudioEnabled()){
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
}else {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
if (!user_id.equals(SpUtil.getUserId() + "")) {
|
||||
AgoraManager.getInstance(getContext()).ClientRole(false);
|
||||
mBinding.rlMic.setVisibility(View.GONE);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, SpUtil.getUserId() + "");
|
||||
}
|
||||
}
|
||||
|
||||
haveMe=false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setRoleType(int roleType, int pit_number) {
|
||||
RelativeLayout rl_voive = mBinding.rlVoive;
|
||||
RelativeLayout rl_mic = mBinding.rlMic;
|
||||
@@ -513,27 +693,26 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
rl_more.setVisibility(View.GONE);//PK
|
||||
rl_misc.setVisibility(View.GONE); //音乐
|
||||
rl_mic.setVisibility(View.GONE); // 麦克风
|
||||
|
||||
|
||||
//根据角色类型显示按钮
|
||||
switch (roleType) {
|
||||
case 2: // 主持人
|
||||
rl_voive.setVisibility(View.VISIBLE);
|
||||
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility(pit_number == 9 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility((pit_number == 9 && pit_number != -11) ? View.VISIBLE : View.GONE);
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
case 1: // 房主
|
||||
rl_voive.setVisibility(View.VISIBLE);
|
||||
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility(pit_number == 9 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility((pit_number == 9 && pit_number != -11) ? View.VISIBLE : View.GONE);
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
case 3://麦上用户
|
||||
rl_voive.setVisibility(View.VISIBLE);
|
||||
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility(pit_number == 9 ? View.VISIBLE : View.GONE);
|
||||
rl_more.setVisibility((pit_number == 9 && pit_number != -11) ? View.VISIBLE : View.GONE);
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
@@ -543,9 +722,45 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
case 5: // 房间管理员
|
||||
rl_voive.setVisibility(View.VISIBLE);
|
||||
rl_more.setVisibility(View.GONE);//PK
|
||||
rl_misc.setVisibility(View.GONE); //音乐
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("2")) {
|
||||
rl_misc.setVisibility(View.GONE);
|
||||
rl_more.setVisibility(View.GONE);
|
||||
} else if (roleType != 5) {
|
||||
rl_misc.setVisibility(View.VISIBLE);
|
||||
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 (roleType == 5 ){
|
||||
// rl_misc.setVisibility(View.GONE);
|
||||
// rl_more.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
// for (int i = 0; i < mRoomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
// if (mRoomInfoResp.getRoom_info().getPit_list().get(i).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
// rl_mic.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (mRoomInfoResp.getRoom_info().getType_id().equals("6")){
|
||||
rl_voive.setVisibility(View.GONE);//声音
|
||||
rl_more.setVisibility(View.GONE);//PK
|
||||
rl_misc.setVisibility(View.GONE); //音乐
|
||||
rl_mic.setVisibility(View.GONE); // 麦克风
|
||||
mBinding.rlMessage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -558,13 +773,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// mRoomInfoResp.getUser_info().setVoice(type);
|
||||
if (type == 1) {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(true,SpUtil.getUserId()+"");
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(true, SpUtil.getUserId() + "");
|
||||
isSwith = false;
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
AgoraManager.getInstance(getActivity()).ClientRole( true);
|
||||
AgoraManager.getInstance(getActivity()).ClientRole(true);
|
||||
} else {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false,SpUtil.getUserId()+"");
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, SpUtil.getUserId() + "");
|
||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
// AgoraManager.getInstance(getActivity()).ClientRole( false);
|
||||
isSwith = true;
|
||||
@@ -576,10 +791,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
public void isMute(int is_mute){
|
||||
RoomMessageEvent.text text=new RoomMessageEvent.text();
|
||||
public void isMute(int is_mute) {
|
||||
RoomMessageEvent.text text = new RoomMessageEvent.text();
|
||||
text.setIs_mute(is_mute);
|
||||
String s= com.blankj.utilcode.util.GsonUtils.toJson( text);
|
||||
String s = com.blankj.utilcode.util.GsonUtils.toJson(text);
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
t.setFromUserInfo(SpUtil.getUserInfo());
|
||||
t.setText(s);
|
||||
@@ -589,7 +804,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
byte[] binaryData = json.getBytes(StandardCharsets.UTF_8);
|
||||
// 创建自定义消息
|
||||
MessageListenerSingleton.getInstance().sendCustomC2CMessage(
|
||||
SpUtil.getUserInfo().getUser_id()+"",
|
||||
SpUtil.getUserInfo().getUser_id() + "",
|
||||
binaryData
|
||||
);
|
||||
}
|
||||
@@ -605,8 +820,57 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
// 调用 someMethod 方法
|
||||
publicScreenEaseChatFragment.someMethod();
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1003) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding_up);
|
||||
aBoolean = false;
|
||||
setRoleType(3, Integer.parseInt(messageEvent.getText().getPit_number()));
|
||||
switchMic(2);
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1004) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
mBinding.ivWheatFeeding.setImageResource(com.qxcm.moduleutil.R.mipmap.room_wheat_feeding);
|
||||
aBoolean = true;
|
||||
|
||||
setRoleType(0, 0);
|
||||
switchMic(2);
|
||||
}
|
||||
// setRoleType(messageEvent.getRoleType(), messageEvent.getPit_number());
|
||||
} else if (messageEvent.getMsgType() == 1034) {
|
||||
int count = messageEvent.getText().getCount();
|
||||
if (count == 0) {
|
||||
mBinding.tvFirst.setText("0人排队");
|
||||
return;
|
||||
}
|
||||
String countText = String.valueOf(count);
|
||||
String fullText = countText + "人排队";
|
||||
|
||||
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(fullText);
|
||||
spannableStringBuilder.setSpan(
|
||||
new ForegroundColorSpan(ContextCompat.getColor(getContext(), com.qxcm.moduleutil.R.color.colorPrimary)), // 设置颜色为红色
|
||||
0, // 起始位置
|
||||
countText.length(), // 结束位置
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
|
||||
mBinding.tvFirst.setText(spannableStringBuilder);
|
||||
|
||||
|
||||
} else if (messageEvent.getMsgType() == 1016) {
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
if (messageEvent.getText().getIs_mute_pit() == 1) {
|
||||
switchMic(2);
|
||||
}
|
||||
mRoomInfoResp.getUser_info().setIs_mute_pit(String.valueOf(messageEvent.getText().getIs_mute_pit()));
|
||||
mRoomInfoResp.getUser_info().setIs_mute(String.valueOf(messageEvent.getText().getIs_mute()));
|
||||
}
|
||||
} else if (messageEvent.getMsgType() == 1007) {
|
||||
mRoomInfoResp.getUser_info().setIs_host(1);
|
||||
} else if (messageEvent.getMsgType() == 1018) {
|
||||
mRoomInfoResp.getUser_info().setIs_host(0);
|
||||
}else if (messageEvent.getMsgType() == 1024){
|
||||
mRoomInfoResp.getRoom_auction().getAuction_list().clear();
|
||||
mRoomInfoResp.getRoom_auction().getAuction_list().addAll(messageEvent.getText().getAuction_list());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,5 +883,4 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import com.qxcm.moduleutil.bean.MusicSongBean;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.room.RoomPitBean;
|
||||
@@ -62,7 +63,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
private String did;
|
||||
private String duration;
|
||||
private MusicSongBean musicSongBean;
|
||||
|
||||
RoomFragment parentFragment;
|
||||
BaseQuickAdapter<RoomPitBean, BaseViewHolder> adapter;
|
||||
private RoomOnline online;
|
||||
|
||||
@@ -105,6 +106,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
parentFragment = (RoomFragment) getParentFragment();
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
}
|
||||
@@ -129,14 +131,14 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
|
||||
if (roomInfoResp.getSong_user_info() != null) {
|
||||
RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
// RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
if (parentFragment != null) {
|
||||
if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(3, -1);
|
||||
parentFragment.switchMic(1);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, -1);
|
||||
parentFragment.switchMic(2);
|
||||
} else {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
// parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
AgoraManager.getInstance(getActivity()).stopMuisc();
|
||||
@@ -178,9 +180,32 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
if (roomPitBean.getPit_number().equals("9")) {
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muZc;
|
||||
roomDefaultWheatView.setData(roomPitBean);
|
||||
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(2, 9);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
} else if (roomPitBean.getPit_number().equals("10")) {
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muJb;
|
||||
roomDefaultWheatView.setData(roomPitBean);
|
||||
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (parentFragment != null) {
|
||||
parentFragment.setRoleType(2, 10);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,9 +218,12 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
if (roomInfoResp.getSong_user_info() != null) {
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
setVisibilityView(1);
|
||||
} else if (roomInfoResp.getSong_user_info().getIs_hot() == 1) {
|
||||
} else if (roomInfoResp.getSong_user_info().getIs_hot() == 1) {
|
||||
setVisibilityView(1);
|
||||
} else if (roomInfoResp.getSong_user_info().getUser_id().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() + "")) {
|
||||
setVisibilityView(2);
|
||||
} else {
|
||||
setVisibilityView(3);
|
||||
@@ -208,8 +236,10 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
}
|
||||
}
|
||||
|
||||
if (roomDefaultWheatView != null) {
|
||||
if (roomDefaultWheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
if (roomDefaultWheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
if (mBinding.muYc.getUserId().equals(SpUtil.getUserId() + "")){
|
||||
setVisibilityView(4);
|
||||
}else {
|
||||
setVisibilityView(1);
|
||||
}
|
||||
}
|
||||
@@ -251,23 +281,24 @@ 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, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), roomDefaultWheatView.getUserId(), roomDefaultWheatView.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
mBinding.recyclerView.setAdapter(adapter);
|
||||
if (roomInfoResp.getSong_pit_list() != null && roomInfoResp.getSong_pit_list().size() > 0){
|
||||
if (roomInfoResp.getSong_pit_list() != null && roomInfoResp.getSong_pit_list().size() > 0) {
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
}
|
||||
AgoraManager.getInstance(getActivity()).selectAudioTrack(0);
|
||||
|
||||
AgoraManager.getInstance(getActivity()).selectAudioTrack(1);
|
||||
isRotate = true;
|
||||
RoomDefaultWheatView muYc = mBinding.muYc;
|
||||
muYc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!muYc.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), muYc.getUserId(), muYc.pitNumber, getHostUser(), false,2,isNumberWhether(), getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -277,7 +308,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, 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");
|
||||
}
|
||||
@@ -288,15 +319,20 @@ 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, 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", getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), "10", roomInfoResp.getUser_info(),roomInfoResp, getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private int isNumberWhether() {
|
||||
if (roomInfoResp.getUser_info().getPit_number()==9){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* 这是判断当前用户是否是麦上房主、管理员、主持,不在主持麦的都是不同用户
|
||||
*
|
||||
@@ -308,16 +344,28 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
return 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
} else {
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1){
|
||||
return 3;
|
||||
}else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1){
|
||||
return 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void setVisibilityView(int type) {
|
||||
if (type == 1) {
|
||||
mBinding.llBz.setVisibility(View.VISIBLE);
|
||||
mBinding.llBz.setVisibility(View.GONE);
|
||||
mBinding.llDs.setVisibility(View.VISIBLE);
|
||||
mBinding.llJs.setVisibility(View.VISIBLE);
|
||||
mBinding.llQg.setVisibility(View.VISIBLE);
|
||||
@@ -334,6 +382,12 @@ 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){
|
||||
mBinding.llBz.setVisibility(View.VISIBLE);
|
||||
mBinding.llDs.setVisibility(View.GONE);
|
||||
mBinding.llJs.setVisibility(View.VISIBLE);
|
||||
mBinding.llQg.setVisibility(View.VISIBLE);
|
||||
mBinding.llSz.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +410,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(), 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);
|
||||
@@ -376,7 +430,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
endRotateAnimation();
|
||||
AgoraManager.getInstance(getActivity()).destroy();
|
||||
// AgoraManager.getInstance(getActivity()).destroy();
|
||||
}
|
||||
|
||||
//开始旋转
|
||||
@@ -449,6 +503,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
boolean b = false;
|
||||
RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
if (messageEvent.getMsgType() == 1013) {
|
||||
LogUtils.e("@@", messageEvent);
|
||||
@@ -490,23 +545,28 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(3, -1);
|
||||
parentFragment.switchMic(1);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, -1);
|
||||
parentFragment.switchMic(2);
|
||||
} else {
|
||||
if (mBinding.muZc.pitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(2, -1);
|
||||
parentFragment.switchMic(2);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, 0);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
setVisibilityView(1);
|
||||
} else if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
setVisibilityView(1);
|
||||
} else if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
setVisibilityView(2);
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
setVisibilityView(1);
|
||||
} else {
|
||||
setVisibilityView(3);
|
||||
}
|
||||
// if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
// setVisibilityView(1);
|
||||
// } else if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
// setVisibilityView(1);
|
||||
// } else if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
// setVisibilityView(2);
|
||||
// } else if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
// setVisibilityView(1);
|
||||
// } else {
|
||||
// setVisibilityView(3);
|
||||
// }
|
||||
|
||||
} else {
|
||||
did = "";
|
||||
@@ -521,6 +581,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
// parentFragment.mus();
|
||||
// }
|
||||
}
|
||||
sv();
|
||||
} else if (messageEvent.getMsgType() == 1003) {
|
||||
|
||||
if (messageEvent.getText().getPit_number().equals("9") || messageEvent.getText().getPit_number().equals("10")) {
|
||||
@@ -540,7 +601,17 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muJb;
|
||||
roomDefaultWheatView.setData(pitBean);
|
||||
}
|
||||
}else {
|
||||
if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
b = true;
|
||||
AgoraManager.getInstance(getActivity()).ClientRole(true);
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
} else {
|
||||
b = false;
|
||||
}
|
||||
if (parentFragment != null) {
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(pitBean.getPit_number()), true, b);
|
||||
}
|
||||
} else {
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(messageEvent.getText().getPit_number());
|
||||
pitBean.setUser_id(messageEvent.getText().getFromUserInfo().getUser_id() + "");
|
||||
@@ -570,9 +641,20 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
RoomDefaultWheatView roomDefaultWheatView = mBinding.muJb;
|
||||
roomDefaultWheatView.setData(pitBean);
|
||||
}
|
||||
}else {
|
||||
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() + "")){
|
||||
if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
b = true;
|
||||
AgoraManager.getInstance(getActivity()).ClientRole(false);
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||
} else {
|
||||
b = false;
|
||||
}
|
||||
// AgoraManager.getInstance(getActivity()).setEnableAudio(b);
|
||||
if (parentFragment != null) {
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(messageEvent.getText().getPit_number()), false, b);
|
||||
}
|
||||
} else {
|
||||
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().remove(i);
|
||||
break;
|
||||
}
|
||||
@@ -581,7 +663,51 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
}
|
||||
sv();
|
||||
} else if (messageEvent.getMsgType() == 1019) {
|
||||
// RoomCharmRankBean charmRankBean=messageEvent.getText().getUserCharmList().get(0);
|
||||
// RoomPitBean pitBean=mBinding.muYc.pitBean;
|
||||
// pitBean.setCharm(charmRankBean.getCharm());
|
||||
// mBinding.muYc.setData(pitBean);
|
||||
LogUtils.e("1019", messageEvent);
|
||||
// adapter.setNewData(messageEvent.getText().getUserCharmList());
|
||||
} else if (messageEvent.getMsgType() == 1021) {
|
||||
RoomPitBean pitBean = mBinding.muYc.pitBean;
|
||||
pitBean.setCharm("0");
|
||||
mBinding.muYc.setData(pitBean);
|
||||
pitBean = mBinding.muZc.pitBean;
|
||||
pitBean.setCharm("0");
|
||||
mBinding.muZc.setData(pitBean);
|
||||
pitBean = mBinding.muJb.pitBean;
|
||||
pitBean.setCharm("0");
|
||||
mBinding.muJb.setData(pitBean);
|
||||
|
||||
for (int i = 0; i < roomInfoResp.getSong_pit_list().size(); i++) {
|
||||
roomInfoResp.getSong_pit_list().get(i).setCharm("0");
|
||||
}
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
|
||||
} else if (messageEvent.getMsgType() == 1005) {
|
||||
RoomPitBean pitBean = mBinding.muYc.pitBean;
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(pitBean.getUser_id())) {
|
||||
pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muYc.setData(pitBean);
|
||||
}
|
||||
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(mBinding.muZc.pitBean.getUser_id())) {
|
||||
mBinding.muZc.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muZc.setData(mBinding.muZc.pitBean);
|
||||
return;
|
||||
}
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(mBinding.muJb.pitBean.getUser_id())) {
|
||||
mBinding.muJb.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muJb.setData(mBinding.muJb.pitBean);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < roomInfoResp.getSong_pit_list().size(); i++) {
|
||||
if (roomInfoResp.getSong_pit_list().get(i).getUser_id().equals(messageEvent.getText().getToUserInfo().getUser_id() + "")) {
|
||||
roomInfoResp.getSong_pit_list().get(i).setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
}
|
||||
}
|
||||
adapter.setNewData(roomInfoResp.getSong_pit_list());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +755,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
@Override
|
||||
public void postRoomInfo(RoomInfoResp resp) {
|
||||
AgoraManager.getInstance(getActivity()).destroy();
|
||||
// AgoraManager.getInstance(getActivity()).destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -661,4 +787,14 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
public void acceptPk() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUserCharm() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,22 +5,31 @@ import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ObjectUtils;
|
||||
import com.example.moduleroom.R;
|
||||
@@ -37,10 +46,13 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.luck.picture.lib.utils.DoubleUtils;
|
||||
import com.qxcm.moduleutil.base.BaseRoomFragment;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUpPitBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomUserJoinModel;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomPitBean;
|
||||
import com.qxcm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.qxcm.moduleutil.event.RoomBeckoningEvent;
|
||||
import com.qxcm.moduleutil.event.RoomOwnerLeaveEvent;
|
||||
import com.qxcm.moduleutil.event.RoomWheatEvent;
|
||||
@@ -52,8 +64,10 @@ import com.qxcm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.qxcm.moduleutil.rtc.AgoraManager;
|
||||
import com.qxcm.moduleutil.rtc.MusicPlayBean;
|
||||
import com.qxcm.moduleutil.utils.GsonUtils;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
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.WheatLayoutManager;
|
||||
@@ -65,6 +79,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -89,6 +104,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
private PopupWindow popupWindow;
|
||||
CountDownTimer mCountDownTimer;
|
||||
CountDownTimer mCountDownTimersta;
|
||||
|
||||
public static SingSongFragment newInstance(RoomInfoResp roomInfo) {
|
||||
Bundle args = new Bundle();
|
||||
@@ -112,20 +128,23 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
tzblChanged();
|
||||
updateWheatData();
|
||||
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
}
|
||||
// 初始化 PopupWindow
|
||||
initPopupWindow();
|
||||
isWhether();
|
||||
tzblChanged();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 这是判断当前用户是否是麦上房主、管理员、主持,不在主持麦的都是不同用户
|
||||
* 2025-7-31 10:42:37,新添加的要求:根据角色不同,显示不同的按钮
|
||||
* 房主不论麦上麦下,有全部权限 管理员、主持:不论麦上麦下,有部分权限 用户:只有举报拉黑权限
|
||||
* 所有的是从下往上看数据的时候,只有举报和拉黑
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -135,9 +154,28 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
return 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
private int isNumberWhether() {
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -205,7 +243,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
tvHugMic.setOnClickListener(v -> {
|
||||
// 处理抱麦逻辑
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber, getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber, roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
}
|
||||
@@ -224,12 +262,24 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
|
||||
private boolean cheackWether(String pitNumber) {
|
||||
if (roomInfoResp.getRoom_info().getPit_list().get(8).getUser_id().equals(SpUtil.getUserId() + "") && !pitNumber.equals("10")) {
|
||||
return true;
|
||||
if (roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")) {//排麦模式
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1 || roomInfoResp.getUser_info().getIs_host() == 1 || roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
if (pitNumber.equals("9")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (roomInfoResp.getRoom_info().getPit_list().get(8).getUser_id().equals(SpUtil.getUserId() + "") && !pitNumber.equals("10")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
protected void updateWheatData() {
|
||||
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list())) {
|
||||
for (RoomPitBean bean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
@@ -240,32 +290,26 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
EventBus.getDefault().post(event);
|
||||
}
|
||||
|
||||
private void initEM() {
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||
List<String> list = new ArrayList<>();
|
||||
if (pitBean.getIs_online() == 1) {
|
||||
if (pitBean.getUser_id().equals(SpUtil.getUserId())) {
|
||||
pitBean.setIs_online(1);
|
||||
// updateWheatData();
|
||||
// showInOnWhatView(i, 1);
|
||||
EventBus.getDefault().post(pitBean);
|
||||
}
|
||||
if (pitBean.getEmchat_username() != null &&
|
||||
!pitBean.getEmchat_username().isEmpty() &&
|
||||
!pitBean.getEmchat_username().equals("0")) {
|
||||
list.add(pitBean.getEmchat_username());
|
||||
|
||||
protected void tzblChanged() {
|
||||
// mBinding.dhv9.updateTzbl(SpUtil.getTzbl(roomId));
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tzblChanged() {
|
||||
super.tzblChanged();
|
||||
// mBinding.dhv9.updateTzbl(SpUtil.getTzbl(roomId));
|
||||
if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
} else {
|
||||
updateWheatData();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,7 +330,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber1);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
} else {
|
||||
@@ -298,7 +342,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
roomPitBean = pitBean;
|
||||
showPopupMenu(view); // v 是点击的按钮视图
|
||||
} else if (pitNumber1 == 10) {
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 - 1 + "", getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 - 1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomId, pitNumber1 - 1 + "");
|
||||
}
|
||||
@@ -315,6 +359,8 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
|
||||
wheatLayoutManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void isWhether() {
|
||||
@@ -331,7 +377,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber1);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number() + "", getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number() + "", getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
} else {
|
||||
@@ -342,10 +388,12 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
pitNumber = pitBean.getPit_number();
|
||||
roomPitBean = pitBean;
|
||||
showPopupMenu(view); // v 是点击的按钮视图
|
||||
} else if (pitNumber1 == 10) {
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", getChildFragmentManager());
|
||||
} else {
|
||||
} else if (pitNumber1 == 10 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
} else if (pitNumber1 != 10) {
|
||||
MvpPre.applyPit(roomId, pitNumber1 + "");
|
||||
} else {
|
||||
ToastUtils.show("请等待主持抱麦");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,12 +412,17 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
mBinding.flexboxLayout.setVisibility(View.GONE);
|
||||
mBinding.cl.setVisibility(View.VISIBLE);
|
||||
MvpPre.postRoomInfo(roomInfoResp.getPk_info().getPk_room_id(), roomInfoResp.getUser_info().getPit_number() + "", 1);
|
||||
|
||||
}
|
||||
|
||||
mBinding.btSta.setOnClickListener(this::onClick);
|
||||
mBinding.btStop.setOnClickListener(this::onClick);
|
||||
mBinding.imMkf.setOnClickListener(this::onClick);
|
||||
|
||||
if (roomInfoResp.getUser_info().getPit_number() != 9) {
|
||||
mBinding.imMkf.setVisibility(GONE);
|
||||
} else {
|
||||
mBinding.imMkf.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onWheatClicked(View ii) {
|
||||
@@ -433,7 +486,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
Logger.e("@@@", "加入房间" + event);
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
if (event.getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
||||
roomInfoResp.getRoom_info().getPit_list().get(i).setIs_online(1);
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
||||
break;
|
||||
@@ -450,7 +502,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
if (roomInfoResp.getRoom_info().getFriend().getFriend_status() == 2) {
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
if (event.getUser_id().equals(roomInfoResp.getRoom_info().getPit_list().get(i).getUser_id())) {
|
||||
roomInfoResp.getRoom_info().getPit_list().get(i).setIs_online(2);
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(roomInfoResp.getRoom_info().getPit_list().get(i).getEmchat_username());
|
||||
quxiao(list);
|
||||
@@ -525,30 +576,35 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
updateWheatData();
|
||||
}
|
||||
|
||||
private boolean aBoolean=false;
|
||||
private boolean aBoolean = false;
|
||||
private int is_mute;
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.bt_sta) {
|
||||
PkTimeDialogFragment.show(roomInfoRespPk.getPk_info().getPk_id(), getChildFragmentManager());
|
||||
} else if (id == R.id.bt_stop) {
|
||||
MvpPre.endPk(roomInfoRespPk.getPk_info().getPk_id(), "3", SpUtil.getUserId() + "");
|
||||
} else if (id == R.id.im_mkf) {
|
||||
if (aBoolean){
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
is_mute=0;
|
||||
aBoolean=false;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(true);
|
||||
if (roomInfoRespPk.getPk_info().getPk_part().equals("3") && pkStatus==0){
|
||||
pkStutas();
|
||||
}else {
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
is_mute=1;
|
||||
aBoolean=true;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(false);
|
||||
MvpPre.endPk(roomInfoRespPk.getPk_info().getPk_id(), "3", SpUtil.getUserId() + "");
|
||||
}
|
||||
RoomMessageEvent.text text=new RoomMessageEvent.text();
|
||||
} else if (id == R.id.im_mkf) {
|
||||
if (aBoolean) {
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
is_mute = 0;
|
||||
aBoolean = false;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(false);
|
||||
} else {
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
is_mute = 1;
|
||||
aBoolean = true;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(true);
|
||||
}
|
||||
RoomMessageEvent.text text = new RoomMessageEvent.text();
|
||||
text.setIs_mute(is_mute);
|
||||
String s= com.blankj.utilcode.util.GsonUtils.toJson( text);
|
||||
String s = com.blankj.utilcode.util.GsonUtils.toJson(text);
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
t.setText(s);
|
||||
RoomMessageEvent roomMessageEvent = new RoomMessageEvent(125, roomInfoResp.getPk_info().getPk_room_id(), t);
|
||||
@@ -625,6 +681,27 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
}
|
||||
|
||||
private Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
if (list != null) {
|
||||
for (int i = 0; i < list.size(); 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秒后执行
|
||||
}
|
||||
}
|
||||
|
||||
private void pkView() {
|
||||
mBinding.flexboxLayout.setVisibility(View.GONE);
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
@@ -637,7 +714,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber1);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
} else {
|
||||
@@ -649,7 +726,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
roomPitBean = pitBean;
|
||||
showPopupMenu(view); // v 是点击的按钮视图
|
||||
} else if (pitNumber1 == 10) {
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomId, pitNumber1 + "");
|
||||
}
|
||||
@@ -663,7 +740,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomInfoRespPk.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoRespPk.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
}
|
||||
@@ -676,7 +753,11 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
pitBean.set_pk(true);
|
||||
}
|
||||
wheatLayoutManager1.setWheatDataPk(roomInfoResp.getRoom_info().getPit_list(), 1);
|
||||
|
||||
if (roomInfoResp.getUser_info().getPit_number() != 9) {
|
||||
mBinding.imMkf.setVisibility(GONE);
|
||||
} else {
|
||||
mBinding.imMkf.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
FlexboxLayout flexboxLayout2 = mBinding.flexboxLayout2;
|
||||
wheatLayoutManager2 = new WheatLayoutManager(requireContext(), flexboxLayout2);
|
||||
@@ -692,7 +773,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber1);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
} else {
|
||||
@@ -704,7 +785,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
roomPitBean = pitBean;
|
||||
showPopupMenu(view); // v 是点击的按钮视图
|
||||
} else if (pitNumber1 == 10) {
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", getChildFragmentManager());
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomId, pitNumber1 + "");
|
||||
}
|
||||
@@ -718,7 +799,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + pitNumber);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomInfoRespPk.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, getChildFragmentManager());
|
||||
RoomUserInfoFragment.show(roomInfoRespPk.getRoom_info().getRoom_id(), pitBean.getUser_id(), pitNumber + "", getHostUser(), true, 3, isNumberWhether(), getChildFragmentManager());
|
||||
// 点击的麦位是当前麦位
|
||||
// 可以执行相应的操作,如显示提示信息或执行其他逻辑
|
||||
}
|
||||
@@ -754,19 +835,34 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
|
||||
// 设置进度
|
||||
mBinding.pkProgress.setAnimProgress(progress);
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9 ) {
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
mBinding.btStop.setVisibility(View.VISIBLE);
|
||||
mBinding.btSta.setVisibility(View.VISIBLE);
|
||||
if (roomInfoRespPk.getPk_info().getPk_part().equals("4")) {
|
||||
mBinding.btStop.setVisibility(INVISIBLE);
|
||||
}
|
||||
if (roomInfoResp.getPk_info() != null) {
|
||||
if (roomInfoResp.getPk_info().getPk_part().equals("3")) {
|
||||
mBinding.btSta.setVisibility(INVISIBLE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mBinding.btStop.setVisibility(INVISIBLE);
|
||||
mBinding.btSta.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
if (roomInfoRespPk.getPk_info().getPk_part().equals("2")) {
|
||||
mBinding.tvPkDjs.setText("等待开始");
|
||||
// mBinding.tvPkDjs.setText("等待开始");
|
||||
// 获取当前时间
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
// 设置时间为当前时间加上5分钟
|
||||
calendar.add(Calendar.MINUTE, 5);
|
||||
// 获取毫秒时间戳
|
||||
long futureTimeMillis = calendar.getTimeInMillis() / 1000;
|
||||
|
||||
// System.out.println("5分钟后的时间戳: " + futureTimeMillis);
|
||||
startCountdown();
|
||||
// countDownTime(futureTimeMillis, 0);
|
||||
} else if (roomInfoRespPk.getPk_info().getPk_part().equals("3")) {
|
||||
countDownTime(Long.parseLong(roomInfoRespPk.getPk_info().getPk_end_times() != null ? roomInfoRespPk.getPk_info().getPk_end_times() : "0"), 1);
|
||||
} else if (roomInfoRespPk.getPk_info().getPk_part().equals("4")) {
|
||||
@@ -774,6 +870,20 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
}
|
||||
|
||||
// 添加一个方法来启动倒计时
|
||||
private void startCountdown() {
|
||||
mCountDownTimersta = new CountDownTimer(5 * 60 * 1000, 1000) { // 5分钟倒计时,每秒更新一次
|
||||
public void onTick(long millisUntilFinished) {
|
||||
long seconds = millisUntilFinished / 1000;
|
||||
mBinding.tvPkDjs.setText(String.format("等待开始 : %02d:%02d", seconds / 60, seconds % 60));
|
||||
}
|
||||
|
||||
public void onFinish() {
|
||||
mBinding.tvPkDjs.setText("开始");
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* 倒计时
|
||||
*
|
||||
@@ -834,7 +944,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
}
|
||||
String formattedTime = formatTime(seconds);
|
||||
if (type == 0) {
|
||||
mBinding.tvPkDjs.setText("等待:" + formattedTime);
|
||||
mBinding.tvPkDjs.setText("等待开始:" + formattedTime);
|
||||
} else if (type == 1) {
|
||||
mBinding.tvPkDjs.setText("进行中:" + formattedTime);
|
||||
} else if (type == 2) {
|
||||
@@ -849,9 +959,15 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
if (mCountDownTimer != null) {
|
||||
mCountDownTimer.cancel();
|
||||
mCountDownTimer = null;
|
||||
|
||||
mBinding.tvPkDjs.setVisibility(GONE);
|
||||
|
||||
}
|
||||
if (mCountDownTimersta != null) {
|
||||
mCountDownTimersta.cancel();
|
||||
mCountDownTimersta = null;
|
||||
mBinding.tvPkDjs.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -885,7 +1001,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
b = false;
|
||||
}
|
||||
if (parentFragment != null) {
|
||||
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(message.getText().getPit_number()), true, b);
|
||||
}
|
||||
} else if (message.getMsgType() == 1004) {
|
||||
@@ -913,10 +1028,26 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(message.getText().getPit_number()), false, b);
|
||||
}
|
||||
} else if (message.getMsgType() == 1005) {
|
||||
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()));
|
||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (RoomPitBean pitBean : roomInfoRespPk.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager2.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (message.getMsgType() == 1030) {
|
||||
@@ -928,19 +1059,23 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
} else {
|
||||
mBinding.btSta.setVisibility(INVISIBLE);
|
||||
}
|
||||
parentFragment.setRoleType(5,-11);
|
||||
}
|
||||
} else if (message.getMsgType() == 1031) {
|
||||
countDownTime(Long.parseLong(message.getText().getPk_end_times()), 1);
|
||||
mBinding.btSta.setVisibility(INVISIBLE);
|
||||
} else if (message.getMsgType() == 1032) {
|
||||
PkResultDialogFragment pkResultDialogFragment = new PkResultDialogFragment(requireContext(), message);
|
||||
pkResultDialogFragment.show();
|
||||
// PkResultDialogFragment pkResultDialogFragment = new PkResultDialogFragment(requireContext(), message);
|
||||
// pkResultDialogFragment.show();
|
||||
showCountDownDialog(requireContext(), message);
|
||||
ivitTop(message);
|
||||
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);
|
||||
} else if (message.getMsgType() == 1015) {
|
||||
String roomIdA = message.getText().getRoom_id_a();
|
||||
String roomIdB = message.getText().getRoom_id_b();
|
||||
@@ -951,45 +1086,188 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// 当前 roomId 与 roomIdA 相同
|
||||
mBinding.tvPkLeftValue.setText(createValueA);
|
||||
mBinding.tvPkRightValue.setText(receiveValueB);
|
||||
mBinding.pkProgress.setAnimProgress(100f * Integer.parseInt(createValueA) / (Integer.parseInt(createValueA) + Integer.parseInt(receiveValueB)));
|
||||
|
||||
} else if (roomIdB.equals(roomId)) {
|
||||
// 当前 roomId 与 roomIdB 相同
|
||||
mBinding.tvPkLeftValue.setText(receiveValueB);
|
||||
mBinding.tvPkRightValue.setText(createValueA);
|
||||
mBinding.pkProgress.setAnimProgress(100f * Integer.parseInt(receiveValueB) / (Integer.parseInt(createValueA) + Integer.parseInt(receiveValueB)));
|
||||
|
||||
}
|
||||
mBinding.pkProgress.setAnimProgress(100f * Integer.parseInt(createValueA) / (Integer.parseInt(createValueA) + Integer.parseInt(receiveValueB)));
|
||||
} else if (message.getMsgType() == 125) {
|
||||
RoomMessageEvent.text text = com.blankj.utilcode.util.GsonUtils.fromJson(message.getText().getText(), RoomMessageEvent.text.class);
|
||||
if (text.getIs_mute()==1){
|
||||
if (text.getIs_mute() == 1) {
|
||||
AgoraManager.getInstance(getContext()).ClientRole(false);
|
||||
AgoraManager.getInstance(getContext()).muteLocalAudioStreamEx(false, SpUtil.getUserId());
|
||||
}else {
|
||||
} else {
|
||||
AgoraManager.getInstance(getContext()).ClientRole(true);
|
||||
AgoraManager.getInstance(getContext()).muteLocalAudioStreamEx(true, SpUtil.getUserId());
|
||||
|
||||
}
|
||||
}else if (message.getMsgType() == 1007){
|
||||
} else if (message.getMsgType() == 1007) {
|
||||
roomInfoResp.getUser_info().setIs_host(1);
|
||||
}else if (message.getMsgType() == 1018){
|
||||
} else if (message.getMsgType() == 1018) {
|
||||
roomInfoResp.getUser_info().setIs_host(0);
|
||||
}else if (message.getMsgType() == 126){
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false,message.getText().getFromUserInfo().getUser_id()+"");
|
||||
} else if (message.getMsgType() == 126) {
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false, message.getText().getFromUserInfo().getUser_id() + "");
|
||||
} else if (message.getMsgType() == 1021) {
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
pitBean.setCharm("0");
|
||||
wheatLayoutManager.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void queren() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"对方想结束本次pk,是否同意",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre.endPk(roomInfoRespPk.getPk_info().getPk_id(), "3", SpUtil.getUserId() + "");
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private void pkStutas() {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"惩罚阶段结束PK需要对方主持同意,是否发起结束?",
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
// 点击“确认”按钮时执行删除操作
|
||||
MvpPre.endPk(roomInfoRespPk.getPk_info().getPk_id(), "3", SpUtil.getUserId() + "");
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private int pkStatus;
|
||||
|
||||
private void ivitTop(RoomMessageEvent message) {
|
||||
mBinding.imStart2.setVisibility(View.VISIBLE);
|
||||
mBinding.imStart.setVisibility(VISIBLE);
|
||||
if (message.getText().getType() == 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;
|
||||
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;
|
||||
mBinding.imStart.setImageResource(com.qxcm.moduleutil.R.mipmap.ping);
|
||||
mBinding.imStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.ping);
|
||||
}
|
||||
countDownTime(Long.parseLong(message.getText().getEnd_time()), 2);
|
||||
}
|
||||
|
||||
public void showCountDownDialog(Context context, RoomMessageEvent message) {
|
||||
// PkResultDialogFragment pkResultDialogFragment = new PkResultDialogFragment(requireContext(), message);
|
||||
// pkResultDialogFragment.show();
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
View dialogView = getLayoutInflater().inflate(R.layout.fragment_pk_result_dialog, null);
|
||||
builder.setView(dialogView);
|
||||
|
||||
// TextView btnKnow = dialogView.findViewById(R.id.btn_know);
|
||||
// TextView tvCountDown = dialogView.findViewById(R.id.tv_countdown);
|
||||
|
||||
ConstraintLayout clPk = dialogView.findViewById(R.id.cl_pk);
|
||||
GifAvatarOvalView userAvatar1 = dialogView.findViewById(R.id.user_avatar1);
|
||||
GifAvatarOvalView userAvatar2 = dialogView.findViewById(R.id.user_avatar2);
|
||||
TextView tvName1 = dialogView.findViewById(R.id.tv_name1);
|
||||
TextView tvName2 = dialogView.findViewById(R.id.tv_name2);
|
||||
ImageView ivStart1 = dialogView.findViewById(R.id.iv_start1);
|
||||
ImageView ivStart2 = dialogView.findViewById(R.id.iv_start2);
|
||||
|
||||
|
||||
final AlertDialog dialog = builder.create();
|
||||
// dialog.setCancelable(false); // 防止点击外部取消
|
||||
if (message.getText().getType() == 0) {
|
||||
clPk.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.pk_sb);
|
||||
ImageUtils.loadHeadCC(message.getText().getDefeated_cover(), userAvatar1);
|
||||
ImageUtils.loadHeadCC(message.getText().getVictory_cover(), userAvatar2);
|
||||
tvName1.setText(message.getText().getDefeated_name());
|
||||
tvName2.setText(message.getText().getVictory_name());
|
||||
ivStart1.setImageResource(com.qxcm.moduleutil.R.mipmap.fail);
|
||||
ivStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.victory);
|
||||
} else if (message.getText().getType() == 1) {
|
||||
clPk.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.pk_sl);
|
||||
ImageUtils.loadHeadCC(message.getText().getDefeated_cover(), userAvatar2);
|
||||
ImageUtils.loadHeadCC(message.getText().getVictory_cover(), userAvatar1);
|
||||
tvName1.setText(message.getText().getVictory_name());
|
||||
tvName2.setText(message.getText().getDefeated_name());
|
||||
ivStart1.setImageResource(com.qxcm.moduleutil.R.mipmap.victory);
|
||||
ivStart2.setImageResource(com.qxcm.moduleutil.R.mipmap.fail);
|
||||
} else if (message.getText().getType() == 2) {
|
||||
clPk.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.pk_pj);
|
||||
ImageUtils.loadHeadCC(message.getText().getDefeated_cover(), userAvatar2);
|
||||
ImageUtils.loadHeadCC(message.getText().getVictory_cover(), userAvatar1);
|
||||
tvName1.setText(message.getText().getVictory_name());
|
||||
tvName2.setText(message.getText().getDefeated_name());
|
||||
ivStart1.setVisibility(View.GONE);
|
||||
ivStart2.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
final CountDownTimer countDownTimer = new CountDownTimer(5000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
int secondsRemaining = (int) (millisUntilFinished / 1000);
|
||||
// tvCountDown.setText(String.valueOf(secondsRemaining));
|
||||
// if (secondsRemaining==0){
|
||||
//
|
||||
// dialog.dismiss(); // 手动关闭对话框
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
dialog.dismiss(); // 倒计时结束自动关闭
|
||||
}
|
||||
};
|
||||
|
||||
// btnKnow.setOnClickListener(v -> {
|
||||
// countDownTimer.cancel(); // 取消倒计时
|
||||
// dialog.dismiss(); // 手动关闭对话框
|
||||
// });
|
||||
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
}
|
||||
|
||||
dialog.show();
|
||||
|
||||
countDownTimer.start(); // 开始倒计时
|
||||
//设置 Dialog 最大宽度(例如屏幕宽度的 80%)
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = (int) (context.getResources().getDisplayMetrics().widthPixels * 0.9f); // 80% 屏幕宽度
|
||||
int maxHeightDp = 200; // 最大高度 200dp
|
||||
int maxHeightPx = (int) (maxHeightDp * context.getResources().getDisplayMetrics().density);
|
||||
|
||||
// lp.height = Math.min(
|
||||
// maxHeightPx,
|
||||
// context.getResources().getDisplayMetrics().heightPixels * 3 / 5
|
||||
// ); // 取较小值
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
}
|
||||
@@ -55,94 +55,35 @@ public class DataListPresenter extends BaseRoomPresenter<DataListContacts.View>
|
||||
}
|
||||
});
|
||||
|
||||
// ApiClient.getInstance().getCharmList(roomId, type, new BaseObserver<CharmRankingResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// Log.d(TAG, "onSubscribe: isOK");
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(CharmRankingResp charmRankingResp) {
|
||||
// //RxJava + Retrefit + mvp模式
|
||||
// //charmRankingResp请求成功获取到的结果
|
||||
// //获取魅力ListsBean数据
|
||||
// List<CharmRankingResp.ListsBean> lists = charmRankingResp.getLists();
|
||||
// if (!ObjectUtils.isEmpty(lists)) {//lists判空
|
||||
// //榜一
|
||||
// if (lists.size() > 0) {
|
||||
// MvpRef.get().setNo1(lists.get(0));
|
||||
// }
|
||||
// //榜二
|
||||
// if (lists.size() > 1) {
|
||||
// MvpRef.get().setNo2(lists.get(1));
|
||||
// }
|
||||
// //榜三
|
||||
// if (lists.size() > 2) {
|
||||
// MvpRef.get().setNo3(lists.get(2));
|
||||
// }
|
||||
// //第四名及后
|
||||
// if (lists.size() > 3) {
|
||||
// MvpRef.get().setCharmView(lists.subList(3, lists.size()));
|
||||
// }
|
||||
// }else {
|
||||
// MvpRef.get().setCharmEmpty();
|
||||
// }
|
||||
// Log.d(TAG, "onNext: getCharmListInfo isOK");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// Log.d(TAG, "onComplete: isOK");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e) {
|
||||
// super.onError(e);
|
||||
// Log.e(TAG, "onError: getCharmListInfo isError");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getWealthListInfo(String roomId, int type) {
|
||||
// ApiClient.getInstance().getWealthList(roomId, type, new BaseObserver<WealthRankingResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(WealthRankingResp wealthRankingResp) {
|
||||
// //获取财富ListsBean数据
|
||||
// List<WealthRankingResp.ListsBean> lists = wealthRankingResp.getLists();
|
||||
// if (!ObjectUtils.isEmpty(lists)) {//lists判空
|
||||
// //榜一
|
||||
// if (lists.size() > 0) {
|
||||
// MvpRef.get().setNo1(lists.get(0));
|
||||
// }
|
||||
// //榜二
|
||||
// if (lists.size() > 1) {
|
||||
// MvpRef.get().setNo2(lists.get(1));
|
||||
// }
|
||||
// //榜三
|
||||
// if (lists.size() > 2) {
|
||||
// MvpRef.get().setNo3(lists.get(2));
|
||||
// }
|
||||
// //第四名及后
|
||||
// if (lists.size() > 3) {
|
||||
// MvpRef.get().setWealthView(lists.subList(3, lists.size()));
|
||||
// }
|
||||
// }else {
|
||||
// MvpRef.get().setWealthEmpty();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
public void getWealthListInfo(String roomId, String type, String time_type, String page, String page_limit) {
|
||||
api.getRoomRank(roomId, type,time_type,page,page_limit, new BaseObserver<List<CharmRankingResp>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CharmRankingResp> charmRankingResp) {
|
||||
if (!ObjectUtils.isEmpty(charmRankingResp)){
|
||||
if (charmRankingResp.size()>0){
|
||||
MvpRef.get().setNo1(charmRankingResp.get(0));
|
||||
}
|
||||
if (charmRankingResp.size()>1){
|
||||
MvpRef.get().setNo2(charmRankingResp.get(1));
|
||||
}
|
||||
if (charmRankingResp.size()>2){
|
||||
MvpRef.get().setNo3(charmRankingResp.get(2));
|
||||
}
|
||||
if (charmRankingResp.size()>3) {
|
||||
MvpRef.get().setWealthEmpty(charmRankingResp.subList(3, charmRankingResp.size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ public class RoomAuctionPresenter extends BasePresenter<RoomAuctionContacts.View
|
||||
}
|
||||
|
||||
@Override
|
||||
public void auctionEnd(String auctionId) {
|
||||
RetrofitClient.getInstance().auctionEnd(auctionId, new BaseObserver<String>() {
|
||||
public void auctionEnd(String auctionId,String roomId) {
|
||||
RetrofitClient.getInstance().auctionEnd(auctionId,roomId, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
@@ -63,8 +63,8 @@ public class RoomAuctionPresenterTow extends BasePresenter<RoomAuctionContacts.V
|
||||
}
|
||||
|
||||
@Override
|
||||
public void auctionEnd(String auctionId) {
|
||||
RetrofitClient.getInstance().auctionEnd(auctionId, new BaseObserver<String>() {
|
||||
public void auctionEnd(String auctionId,String roomId) {
|
||||
RetrofitClient.getInstance().auctionEnd(auctionId,roomId, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
@@ -27,6 +27,7 @@ public class RoomPkPresenter extends BasePresenter<RoomPkContacts.View> implemen
|
||||
@Override
|
||||
public void onNext(List<RoomBean> roomBeans) {
|
||||
MvpRef.get().searchPkRoom(roomBeans);
|
||||
MvpRef.get().finishLoading();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.google.gson.reflect.TypeToken;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.qxcm.moduleutil.bean.RoomResultResp;
|
||||
import com.qxcm.moduleutil.bean.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.Config;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
@@ -62,11 +63,14 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
SpUtil.setRtmToken(rtm_token);
|
||||
int uid = SpUtil.getUserId(); // 0 表示由 Agora 自动生成 UID
|
||||
boolean enableMic = false; // 是否开启麦克风
|
||||
boolean enableJs=false; // 是否开启角色
|
||||
if (resp.getUser_info().getPit_number()!=0){
|
||||
enableJs=true;
|
||||
}
|
||||
|
||||
// 初始化 Agora 并加入房间
|
||||
AgoraManager.getInstance(getView().getSelfActivity())
|
||||
.init(appId)
|
||||
.joinRoom(token, roomId, uid, enableMic);
|
||||
.joinRoom(token, roomId, uid, enableMic,enableJs);
|
||||
|
||||
// RtcCore rtcCore = RtcCore.getInstance(getView().getSelfActivity());
|
||||
// rtcCore.initAgora(appId);
|
||||
@@ -264,6 +268,7 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
|
||||
MvpRef.get().quitRoom();
|
||||
}
|
||||
});
|
||||
@@ -299,4 +304,34 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUserCharm(String roomId, String userId) {
|
||||
api.clearUserCharm(roomId, userId, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().clearUserCharm();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,16 @@ public class RoomSettingPresenter extends BasePresenter<RoomSettingContacts.View
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().changeRoomSuccess(s, position,bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
super.onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,22 @@ package com.example.moduleroom.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.moduleroom.contacts.RoomUserContacts;
|
||||
import com.qxcm.moduleutil.bean.RelationCardBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RoomUserPresenter extends BasePresenter<RoomUserContacts.View> implements RoomUserContacts.IEmotionRoomPre {
|
||||
RoomUserContacts.View mView;
|
||||
|
||||
public RoomUserPresenter(RoomUserContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,6 +66,76 @@ public class RoomUserPresenter extends BasePresenter<RoomUserContacts.View> impl
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giveCoin(String user_id, String coin) {
|
||||
api.giveCoin(user_id, coin, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().giveCoin();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void relationCard(String user_id) {
|
||||
api.relationCard(user_id, new BaseObserver<RelationCardBean>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(RelationCardBean relationCardBeans) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().relationCard(relationCardBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void topRelationCard(String id) {
|
||||
api.topRelationCard(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().topRelationCard(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRelationCard(String id) {
|
||||
api.deleteRelationCard(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().deleteRelationCard(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kickOutRoom(String roomId, String userId) {
|
||||
api.kickOutRoom(roomId, userId, new BaseObserver<String>() {
|
||||
@@ -124,7 +201,7 @@ public class RoomUserPresenter extends BasePresenter<RoomUserContacts.View> impl
|
||||
|
||||
@Override
|
||||
public void userGuanz(String userId, String type) {
|
||||
api.userGuanz(userId,type, new BaseObserver<String>() {
|
||||
api.userGuanz(userId, type, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
|
||||
@@ -5,11 +5,14 @@ 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.UserOnlineStatusBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.rtc.AgoraManager;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View> implements SingSongContacts.IEmotionRoomPre {
|
||||
@@ -62,7 +65,7 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
||||
});
|
||||
}
|
||||
|
||||
/// 请求房间信息,当pk同意的时候,获取对方房间信息,同时请求自己房间信息,做页面的更新 添加一type:1:请求对方信息 2:请求自己房间信息
|
||||
/// 请求房间信息,当pk同意的时候,获取对方房间信息,同时请求自己房间信息,做页面的更新 添加一type:1:请求对方信息 2:请求自己房间信息 3:是否接受PK
|
||||
@Override
|
||||
public void postRoomInfo(String roomId, String number,int type) {
|
||||
api.postRoomInfo(roomId, new BaseObserver<RoomInfoResp>() {
|
||||
@@ -115,4 +118,19 @@ public class SingSongPresenter extends BaseRoomPresenter<SingSongContacts.View>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.example.moduleroom.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
import com.example.moduleroom.contacts.UserGiftWallConacts;
|
||||
import com.qxcm.moduleutil.bean.GiftBean;
|
||||
import com.qxcm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class UserGiftWallPresenter extends BasePresenter<UserGiftWallConacts.View> implements UserGiftWallConacts.IUserGiftWallPre {
|
||||
|
||||
public UserGiftWallPresenter(UserGiftWallConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void giftWall(String userId) {
|
||||
api.giftWall(userId ,new BaseObserver<GiftUserWallBean>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(GiftUserWallBean giftUserWallBeans) {
|
||||
MvpRef.get().setGiftWall(giftUserWallBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_top" />
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_gift"
|
||||
android:layout_width="0dp"
|
||||
@@ -129,7 +128,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView
|
||||
<com.qxcm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_135"
|
||||
@@ -153,16 +152,15 @@
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:src="@mipmap/quan" />
|
||||
<!-- 自定义内容 -->
|
||||
</com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView>
|
||||
</com.qxcm.moduleutil.widget.floatingView.Floa>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView
|
||||
<com.qxcm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat_zuoji"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible"
|
||||
@@ -265,7 +263,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/im_hq"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/heab_t"
|
||||
android:visibility="visible"
|
||||
@@ -276,7 +274,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView>
|
||||
</com.qxcm.moduleutil.widget.floatingView.Floa>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fullscreen_container"
|
||||
|
||||
36
moduleroom/src/main/res/layout/custom_tab_layout.xml
Normal file
36
moduleroom/src/main/res/layout/custom_tab_layout.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16">
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textBold="BOTH"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textUnselectColor="@color/color_FF999999"
|
||||
app:tl_textsize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:drawableEnd="@mipmap/jt_right"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:text="更多"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="#0DFFB9"
|
||||
android:layout_marginStart="@dimen/dp_8" />
|
||||
</LinearLayout>
|
||||
@@ -5,85 +5,154 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/dp_265"
|
||||
android:layout_height="@dimen/dp_250"
|
||||
android:id="@+id/cl_container"
|
||||
android:layout_width="@dimen/dp_282"
|
||||
android:layout_height="@dimen/dp_353"
|
||||
android:background="@mipmap/auction_cg"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="情侣关系竞拍成功"
|
||||
android:textColor="#FFa4c8"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/avatar1"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_marginStart="@dimen/dp_66"
|
||||
android:layout_marginTop="@dimen/dp_73"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_name1"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="用户名"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="#FE435B"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/avatar1"
|
||||
app:layout_constraintStart_toStartOf="@+id/avatar1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatar1" />
|
||||
app:layout_constraintStart_toStartOf="@+id/avatar1" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/avatar2"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_marginTop="@dimen/dp_73"
|
||||
android:layout_marginEnd="@dimen/dp_68"
|
||||
android:layout_marginEnd="@dimen/dp_70"
|
||||
android:src="@mipmap/default_avatar"
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_name1"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="用户名"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="#FE435B"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="@+id/avatar2"
|
||||
app:layout_constraintStart_toStartOf="@+id/avatar2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatar2" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_57"
|
||||
android:background="@mipmap/bg_wz"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
app:layout_constraintEnd_toEndOf="@+id/avatar2"
|
||||
app:layout_constraintStart_toStartOf="@+id/avatar2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:rotation="-6.9"
|
||||
android:text="情侣关系竞拍成功"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_container_za"
|
||||
android:layout_width="@dimen/dp_370"
|
||||
android:layout_height="@dimen/dp_306"
|
||||
android:background="@mipmap/auction_za"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tname_za"
|
||||
android:layout_width="@dimen/dp_146"
|
||||
android:layout_height="@dimen/dp_19"
|
||||
android:gravity="center"
|
||||
android:text="情侣关系竞拍成功"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_za_name1"
|
||||
android:layout_marginBottom="@dimen/dp_91"/>
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/za_avatar1"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginStart="@dimen/dp_100"
|
||||
android:layout_marginBottom="@dimen/dp_80"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_za_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="用户名"
|
||||
android:textColor="#FFE8B0"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="@+id/za_avatar1"
|
||||
app:layout_constraintStart_toStartOf="@+id/za_avatar1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/za_avatar1" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/za_avatar2"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginEnd="@dimen/dp_96"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/za_avatar1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/za_avatar1"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_za_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:ellipsize="start"
|
||||
android:maxLines="1"
|
||||
android:text="用户名"
|
||||
android:textColor="#FFE8B0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/za_avatar2"
|
||||
app:layout_constraintStart_toStartOf="@+id/za_avatar2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/za_avatar2"
|
||||
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -9,6 +9,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -8,17 +8,44 @@
|
||||
</data>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
>
|
||||
<com.zhpan.bannerview.BannerViewPager
|
||||
android:id="@+id/banner_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/room_user_bj"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="关系卡"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- app:bvp_indicator_visibility="gone"-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_host_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintBottom_toTopOf="@+id/view_line"
|
||||
tools:listitem="@layout/item_relationship" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -54,7 +54,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="输入相关的主播名、房间名"
|
||||
android:hint="输入歌曲名称或歌手"
|
||||
android:maxLength="10"
|
||||
android:singleLine="true"
|
||||
android:textColor="#333333"
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".fragment.RoomFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_all_layout_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/transparent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:background="@color/transparent">
|
||||
|
||||
android:clipToPadding="false">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
@@ -87,12 +86,12 @@
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_voive"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_voice_kg" />
|
||||
<ImageView
|
||||
android:id="@+id/im_voive"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_voice_kg" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -108,7 +107,7 @@
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_microphone"
|
||||
android:src="@mipmap/room_microphone_off"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
@@ -118,8 +117,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_message"
|
||||
@@ -129,13 +127,30 @@
|
||||
android:src="@mipmap/room_message"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_message_dot"-->
|
||||
<!-- android:layout_width="@dimen/dp_14"-->
|
||||
<!-- android:layout_height="@dimen/dp_14"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:src="@mipmap/room_ic_red_dot"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_message_dot"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/room_ic_red_dot"
|
||||
android:background="@drawable/ease_bg_msg_count"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:paddingTop="1.5dp"
|
||||
android:paddingRight="@dimen/dp_5"
|
||||
android:paddingBottom="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:visibility="gone"
|
||||
tools:text="99+"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -144,8 +159,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
@@ -154,13 +168,13 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/room_pk" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_misc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_misc"
|
||||
@@ -175,8 +189,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
@@ -190,8 +203,7 @@
|
||||
android:id="@+id/rl_sett"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
android:layout_weight="0.3">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sett"
|
||||
@@ -228,56 +240,56 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_notice"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_17"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:src="@mipmap/room_ic_notice"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_notice"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_17"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:src="@mipmap/room_ic_notice"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_play"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_8"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:src="@mipmap/room_ic_play"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_notice"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_play"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_8"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:src="@mipmap/room_ic_play"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_notice"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_collect"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:background="@mipmap/collect_g"-->
|
||||
<!-- android:padding="@dimen/dp_4"-->
|
||||
<!-- android:text="关注:1234"-->
|
||||
<!-- android:textColor="@color/color_FFFFF0F0"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_play"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_collect"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:background="@mipmap/collect_g"-->
|
||||
<!-- android:padding="@dimen/dp_4"-->
|
||||
<!-- android:text="关注:1234"-->
|
||||
<!-- android:textColor="@color/color_FFFFF0F0"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_play"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_colse"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:background="@mipmap/collect_g"-->
|
||||
<!-- android:drawableStart="@mipmap/image_243"-->
|
||||
<!-- android:drawablePadding="@dimen/dp_5"-->
|
||||
<!-- android:padding="@dimen/dp_4"-->
|
||||
<!-- android:text="0对在线"-->
|
||||
<!-- android:textColor="@color/color_FFFFF0F0"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tv_collect"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_colse"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_5"-->
|
||||
<!-- android:background="@mipmap/collect_g"-->
|
||||
<!-- android:drawableStart="@mipmap/image_243"-->
|
||||
<!-- android:drawablePadding="@dimen/dp_5"-->
|
||||
<!-- android:padding="@dimen/dp_4"-->
|
||||
<!-- android:text="0对在线"-->
|
||||
<!-- android:textColor="@color/color_FFFFF0F0"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tv_collect"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.qxcm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_nobility"
|
||||
@@ -288,150 +300,173 @@
|
||||
app:layout_constraintStart_toStartOf="@id/container"
|
||||
app:layout_constraintTop_toTopOf="@id/container" />
|
||||
|
||||
<!-- <com.qpyy.room.widget.GuardAnimView-->
|
||||
<!-- android:id="@+id/gav"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <com.qpyy.room.widget.GuardAnimView-->
|
||||
<!-- android:id="@+id/gav"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <com.qpyy.room.widget.BigGiftAnimView-->
|
||||
<!-- android:id="@+id/bgav"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- <com.qpyy.room.widget.BigGiftAnimView-->
|
||||
<!-- android:id="@+id/bgav"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <com.qpyy.room.widget.SmallGiftAnimLayout-->
|
||||
<!-- android:id="@+id/sgal"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:clipChildren="false"-->
|
||||
<!-- android:clipToPadding="false"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@id/ease_container" />-->
|
||||
<!-- <com.qpyy.room.widget.SmallGiftAnimLayout-->
|
||||
<!-- android:id="@+id/sgal"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:clipChildren="false"-->
|
||||
<!-- android:clipToPadding="false"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@id/ease_container" />-->
|
||||
|
||||
|
||||
<!-- <com.stx.xhb.xbanner.XBanner-->
|
||||
<!-- android:id="@+id/banner"-->
|
||||
<!-- android:layout_width="@dimen/dp_70"-->
|
||||
<!-- android:layout_height="@dimen/dp_80"-->
|
||||
<!-- android:layout_marginEnd="17dp"-->
|
||||
<!-- android:layout_marginBottom="18dp"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- app:AutoPlayTime="3000"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@id/ll_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:pageChangeDuration="3000"-->
|
||||
<!-- app:pointContainerPosition="BOTTOM"-->
|
||||
<!-- app:pointNormal="@mipmap/room_ic_banner_point_normal"-->
|
||||
<!-- app:pointSelect="@mipmap/room_ic_banner_point_select"-->
|
||||
<!-- app:pointTopBottomPadding="@dimen/dp_2"-->
|
||||
<!-- app:pointsPosition="CENTER"-->
|
||||
<!-- app:pointsVisibility="true"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true"-->
|
||||
<!-- />-->
|
||||
<!-- <com.stx.xhb.xbanner.XBanner-->
|
||||
<!-- android:id="@+id/banner"-->
|
||||
<!-- android:layout_width="@dimen/dp_70"-->
|
||||
<!-- android:layout_height="@dimen/dp_80"-->
|
||||
<!-- android:layout_marginEnd="17dp"-->
|
||||
<!-- android:layout_marginBottom="18dp"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- app:AutoPlayTime="3000"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@id/ll_bottom"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:pageChangeDuration="3000"-->
|
||||
<!-- app:pointContainerPosition="BOTTOM"-->
|
||||
<!-- app:pointNormal="@mipmap/room_ic_banner_point_normal"-->
|
||||
<!-- app:pointSelect="@mipmap/room_ic_banner_point_select"-->
|
||||
<!-- app:pointTopBottomPadding="@dimen/dp_2"-->
|
||||
<!-- app:pointsPosition="CENTER"-->
|
||||
<!-- app:pointsVisibility="true"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true"-->
|
||||
<!-- />-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_first_charge"-->
|
||||
<!-- android:layout_width="@dimen/dp_60"-->
|
||||
<!-- android:layout_height="@dimen/dp_40"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_12"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/banner"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/banner"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/banner"-->
|
||||
<!-- tools:visibility="visible">-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_first_charge"
|
||||
android:layout_width="@dimen/dp_98"
|
||||
android:layout_height="@dimen/dp_43"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_sound_effects"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_first_charge"-->
|
||||
<!-- android:layout_width="@dimen/dp_44"-->
|
||||
<!-- android:layout_height="@dimen/dp_33"-->
|
||||
<!-- android:scaleType="centerInside"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_first_charge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/paimai"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_first_sub"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_15"-->
|
||||
<!-- android:background="@drawable/index_first_charge_bg"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:maxWidth="@dimen/dp_60"-->
|
||||
<!-- android:minWidth="@dimen/dp_40"-->
|
||||
<!-- android:paddingLeft="@dimen/dp_3"-->
|
||||
<!-- android:paddingRight="@dimen/dp_3"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="8sp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@id/iv_first_charge"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/iv_first_charge"-->
|
||||
<!-- tools:text="待领取" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
<TextView
|
||||
android:id="@+id/tv_first_charge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="排麦模式"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_34"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_first_charge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_first"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="0人排队"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_first_charge" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_sound_paim"-->
|
||||
<!-- android:layout_width="@dimen/dp_46"-->
|
||||
<!-- android:layout_height="@dimen/dp_78"-->
|
||||
<!-- android:src="@mipmap/paimai"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_14"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/iv_sound_effects"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sound_effects"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_78"
|
||||
android:src="@mipmap/room_sound_effects"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:src="@mipmap/room_sound_effects"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_wheat_feeding"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wheat_feeding"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_78"
|
||||
android:src="@mipmap/room_wheat_feeding"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_116"
|
||||
android:src="@mipmap/room_wheat_feeding"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_rain_room"-->
|
||||
<!-- android:layout_width="@dimen/dp_61"-->
|
||||
<!-- android:layout_height="@dimen/dp_61"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_50"-->
|
||||
<!-- android:background="@mipmap/rain_room_red_paper_icon"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent">-->
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_rain_room"-->
|
||||
<!-- android:layout_width="@dimen/dp_61"-->
|
||||
<!-- android:layout_height="@dimen/dp_61"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_50"-->
|
||||
<!-- android:background="@mipmap/rain_room_red_paper_icon"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_rain_room_time"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_10"-->
|
||||
<!-- android:includeFontPadding="false"-->
|
||||
<!-- android:text="00:00"-->
|
||||
<!-- android:textColor="#FEFFB3"-->
|
||||
<!-- android:textSize="9sp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent" />-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_rain_room_time"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_10"-->
|
||||
<!-- android:includeFontPadding="false"-->
|
||||
<!-- android:text="00:00"-->
|
||||
<!-- android:textColor="#FEFFB3"-->
|
||||
<!-- android:textSize="9sp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_rain_room_count"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_24"-->
|
||||
<!-- android:includeFontPadding="false"-->
|
||||
<!-- android:text="0"-->
|
||||
<!-- android:textColor="#FFFFFF"-->
|
||||
<!-- android:textSize="8sp"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_rain_room_count"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_24"-->
|
||||
<!-- android:includeFontPadding="false"-->
|
||||
<!-- android:text="0"-->
|
||||
<!-- android:textColor="#FFFFFF"-->
|
||||
<!-- android:textSize="8sp"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/ic_question_mark"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -111,136 +112,142 @@
|
||||
android:id="@+id/p_b"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@mipmap/za_t" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_p_b"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="0000"
|
||||
android:background="@mipmap/za_s"
|
||||
android:textColor="#FFE8B0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.RoomMakeWheatView
|
||||
android:id="@+id/room_make_wheat2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_p"
|
||||
app:room_make_wheat_number="888" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/container"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_make_wheat2">
|
||||
|
||||
<!-- 关系 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_relation"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/guanx"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="关系"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_relation"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_relation"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_relation" />
|
||||
|
||||
|
||||
<!-- 礼物 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_gift"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/liwu"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_relation"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="礼物"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_gift"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_gift" />
|
||||
|
||||
<!-- 时间 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_time"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/shij"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_gift"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_timetg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
tools:text="时间"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:gravity="center"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_time"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_time"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_time" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/room_auction_jp"
|
||||
android:visibility="invisible"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/container" />
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_p_b"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@mipmap/za_s"
|
||||
android:gravity="center"
|
||||
android:text="0000"
|
||||
android:textColor="#FFE8B0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.RoomMakeWheatView
|
||||
android:id="@+id/room_make_wheat2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_p"
|
||||
app:room_make_wheat_number="888" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_make_wheat2">
|
||||
|
||||
<!-- 关系 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_relation"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/guanx"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="关系"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_relation"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_relation"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_relation" />
|
||||
|
||||
|
||||
<!-- 礼物 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_gift"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/liwu"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_relation"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="礼物"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_gift"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_gift" />
|
||||
|
||||
<!-- 时间 -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/btn_time"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/shij"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_gift"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_timetg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/btn_time"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_time"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_time"
|
||||
tools:text="时间" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/room_auction_jp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/container" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -253,8 +260,8 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/cl">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:src="@mipmap/auction_1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -296,8 +303,8 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_bj1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:src="@mipmap/auction_2"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -338,8 +345,8 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_bj2">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:src="@mipmap/auction_3"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -393,7 +400,7 @@
|
||||
android:id="@+id/avatar_4"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:src="@mipmap/auction"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -423,7 +430,7 @@
|
||||
android:id="@+id/avatar_5"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:src="@mipmap/auction"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -453,7 +460,7 @@
|
||||
android:id="@+id/avatar_6"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:src="@mipmap/auction"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -489,14 +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_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="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>
|
||||
|
||||
@@ -320,6 +320,7 @@
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:clickable="true"
|
||||
app:layout_constraintStart_toEndOf="@+id/cl_bj"
|
||||
app:room_wheat_number="9" />
|
||||
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
android:gravity="center"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:text="在线用户(56)"
|
||||
tools:text="在线用户(56)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/maishang"
|
||||
android:layout_width="@dimen/dp_57"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:text="麦上用户" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/maishang"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_21"-->
|
||||
<!-- android:layout_gravity="left"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:textColor="@color/color_FF666666"-->
|
||||
<!-- android:textSize="@dimen/sp_14"-->
|
||||
<!-- android:text="麦上用户" />-->
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
@@ -54,37 +54,37 @@
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/maixia"
|
||||
android:layout_width="@dimen/dp_57"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:text="卖下用户" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/maixia"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_21"-->
|
||||
<!-- android:layout_gravity="left"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:textColor="@color/color_FF666666"-->
|
||||
<!-- android:textSize="@dimen/sp_14"-->
|
||||
<!-- android:text="麦下用户" />-->
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="false"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
<!-- <com.scwang.smartrefresh.layout.SmartRefreshLayout-->
|
||||
<!-- android:id="@+id/srl2"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:srlEnableLoadMore="true"-->
|
||||
<!-- app:srlEnableRefresh="false"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
||||
<!-- >-->
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/rv_comment2"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="Hello World!"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- />-->
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
<!-- </com.scwang.smartrefresh.layout.SmartRefreshLayout>-->
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -13,8 +13,6 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -38,7 +36,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
/>
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_id"
|
||||
@@ -50,8 +48,7 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gh"
|
||||
@@ -63,8 +60,7 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_id"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_id" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line"
|
||||
@@ -74,99 +70,112 @@
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_gh"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_gh" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/jianj"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:text="个人介绍"
|
||||
android:singleLine="true"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="个人介绍"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_zb"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
android:gravity="center"
|
||||
android:text="转币"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/kb"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/room_kg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:layout_marginStart="@dimen/dp_22"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:src="@mipmap/room_kg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gs"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/gsui"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginStart="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:src="@mipmap/gsui"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/kb"
|
||||
android:visibility="gone"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/kb" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_m_cz"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:background="@drawable/bg_r65_all_0dffb9"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:layout_marginEnd="@dimen/dp_64"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="上麦"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:background="@drawable/bg_r65_all_0dffb9"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"/>
|
||||
android:text="上麦"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_dian"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:src="@mipmap/room_dian"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
android:src="@mipmap/room_dian"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/room_m_cz"
|
||||
app:layout_constraintTop_toTopOf="@id/room_m_cz"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_jb"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/room_jb"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_64"
|
||||
android:src="@mipmap/room_jb"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_lh"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@mipmap/room_lh"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:src="@mipmap/room_lh"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/room_jb"
|
||||
app:layout_constraintTop_toTopOf="@+id/room_jb"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="@+id/room_jb" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/room_rl_gift"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/jianj">
|
||||
|
||||
<TextView
|
||||
@@ -178,8 +187,7 @@
|
||||
android:gravity="center"
|
||||
android:text="礼物图鉴"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ts"
|
||||
@@ -187,81 +195,232 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableEnd="@mipmap/room_rig_jt"
|
||||
android:gravity="center"
|
||||
android:text="90天内累计收到200个礼物"
|
||||
android:drawableEnd="@mipmap/room_rig_jt"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
<!-- <com.example.moduletablayout.CustomSlidingTabLayout-->
|
||||
<!-- android:id="@+id/sliding_tab_layout"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_24"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_12"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_16"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/room_rl_gift"-->
|
||||
<!-- app:tl_tab_space_equal="true"-->
|
||||
<!-- app:tl_textBold="BOTH"-->
|
||||
<!-- app:tl_textSelectColor="@color/white"-->
|
||||
<!-- app:tl_textUnselectColor="@color/color_FF999999"-->
|
||||
<!-- app:tl_textsize="14sp"-->
|
||||
<!-- />-->
|
||||
<!-- <include-->
|
||||
<!-- android:id="@+id/custom_tab_layout"-->
|
||||
<!-- layout="@layout/custom_tab_layout"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/room_rl_gift" />-->
|
||||
|
||||
<!-- <androidx.viewpager.widget.ViewPager-->
|
||||
<!-- android:id="@+id/vp_relationship"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_120"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_13"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout" />-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/custom_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_rl_gift"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textBold="BOTH"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textUnselectColor="@color/color_FF999999"
|
||||
app:tl_textsize="14sp"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_rl_gift">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp_relationship"
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:gravity="center"
|
||||
android:text="关系卡"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="关系位"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:drawableEnd="@mipmap/jt_right"
|
||||
android:gravity="center"
|
||||
android:text="更多"
|
||||
android:textColor="#0DFFB9"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sliding_tab_layout"/>
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:background="@mipmap/guxi_k"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/dp_47"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:gravity="center"
|
||||
tools:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_reqit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@mipmap/regit_t">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
tools:text="开始使用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav2"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_47"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav2"
|
||||
android:layout_alignStart="@+id/user_nav2"
|
||||
android:layout_alignEnd="@+id/user_nav2"
|
||||
android:gravity="center"
|
||||
android:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_43"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
tools:text="5天"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_9" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/room_bo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_29"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/vp_relationship"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_46">
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_room_t"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:src="@mipmap/room_t"
|
||||
/>
|
||||
android:src="@mipmap/room_t" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_room_lt"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:src="@mipmap/room_lt"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
/>
|
||||
android:src="@mipmap/room_lt" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_room_gz"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:src="@mipmap/room_gz"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
/>
|
||||
android:src="@mipmap/room_gz" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_room_sl"
|
||||
android:layout_width="@dimen/dp_82"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:src="@mipmap/room_sl"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
/>
|
||||
android:src="@mipmap/room_sl" />
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
|
||||
@@ -26,15 +26,23 @@
|
||||
app:alignItems="flex_start"
|
||||
/>
|
||||
|
||||
<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
|
||||
android:id="@+id/cl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_sta"
|
||||
@@ -42,7 +50,8 @@
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:background="@mipmap/pk_sta"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_stop"
|
||||
@@ -51,11 +60,12 @@
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:background="@mipmap/pk_stop"
|
||||
app:layout_constraintStart_toEndOf="@+id/bt_sta"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_283"
|
||||
android:layout_height="@dimen/dp_320"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_123"
|
||||
android:layout_marginTop="-23dp"
|
||||
android:background="@mipmap/re_bj"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
android:background="@mipmap/guxi_k"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_nav1"
|
||||
@@ -19,17 +20,19 @@
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/dp_47"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav1"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:text="用户昵称"
|
||||
android:layout_alignStart="@+id/user_nav1"
|
||||
android:layout_alignEnd="@+id/user_nav1"
|
||||
android:gravity="center"
|
||||
tools:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
@@ -38,19 +41,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@mipmap/regit_t"
|
||||
>
|
||||
android:background="@mipmap/regit_t">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_relation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="开始使用"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
tools:text="开始使用"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -59,8 +62,8 @@
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_47"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:riv_oval="true" />
|
||||
|
||||
@@ -69,10 +72,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/user_nav2"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="用户昵称"
|
||||
android:layout_alignStart="@+id/user_nav2"
|
||||
android:layout_alignEnd="@+id/user_nav2"
|
||||
android:gravity="center"
|
||||
android:text="用户昵称"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
@@ -80,13 +83,37 @@
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:text="5天"
|
||||
android:layout_marginTop="@dimen/dp_43"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:background="@drawable/bg_r53_33333"
|
||||
tools:text="5天"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
android:textSize="@dimen/sp_9" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_zhid"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/zhid"
|
||||
android:layout_marginTop="@dimen/dp_73"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_shanchu"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/shanchu"
|
||||
android:layout_marginTop="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
18
moduleroom/src/main/res/layout/item_room_online_text.xml
Normal file
18
moduleroom/src/main/res/layout/item_room_online_text.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<TextView
|
||||
android:id="@+id/maishang"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:textColor="@color/color_FF666666"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:text="麦上用户" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
51
moduleroom/src/main/res/layout/me_fagment_user_gift_wall.xml
Normal file
51
moduleroom/src/main/res/layout/me_fagment_user_gift_wall.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/sl_gift_wall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#fff"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textColor="@color/color_FF000000"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_235"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:spanCount="4"
|
||||
tools:listitem="@layout/me_item_user_gift_wall" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
||||
105
moduleroom/src/main/res/layout/me_item_user_gift_wall.xml
Normal file
105
moduleroom/src/main/res/layout/me_item_user_gift_wall.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data></data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_gift_item"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="12dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_pic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:src="@mipmap/default_image"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_down_on"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/room_gift_select_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:singleLine="true"
|
||||
android:text="甜蜜奶酪"
|
||||
android:textColor="@color/color_FFA9A9A9"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/iv_gift_pic"
|
||||
app:layout_constraintRight_toRightOf="@+id/iv_gift_pic"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_gift_pic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price33"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:text="10000"
|
||||
android:textColor="@color/color_FFFFBC00"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/iv_gift_pic"
|
||||
app:layout_constraintRight_toRightOf="@+id/iv_gift_pic"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_gift_name" />
|
||||
<!-- <TextView -->
|
||||
<!-- android:id="@+id/tv_gift_price2" -->
|
||||
<!-- android:layout_width="wrap_content" -->
|
||||
<!-- android:layout_height="wrap_content" -->
|
||||
<!-- android:layout_marginTop="2dp" -->
|
||||
<!-- android:text="10000" -->
|
||||
<!-- android:textColor="@color/color_FFFFBC00" -->
|
||||
<!-- android:textSize="11sp" -->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="@+id/iv_gift_pic" -->
|
||||
<!-- app:layout_constraintRight_toRightOf="@+id/iv_gift_pic" -->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_gift_name" /> -->
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true"
|
||||
tools:src="@mipmap/default_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_values"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="x100" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
46
moduleroom/src/main/res/layout/room_dialog_message_list.xml
Normal file
46
moduleroom/src/main/res/layout/room_dialog_message_list.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:hyphenate="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_600"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="消息"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.ScrollViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_600"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@mipmap/activity_bj"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@color/color_transparent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -144,7 +144,8 @@
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:layout_constraintStart_toStartOf="@+id/rv_effect_style_list"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_effect_style_list"
|
||||
android:textAlignment="center"/>
|
||||
android:textAlignment="center"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_effect_style_list2"
|
||||
@@ -152,7 +153,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_biansheng"
|
||||
tools:listitem="@layout/room_rv_item_tuner" />
|
||||
tools:listitem="@layout/room_rv_item_tuner"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
@@ -2,160 +2,214 @@
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<data>
|
||||
|
||||
</data>
|
||||
<data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="460dp"
|
||||
android:background="@drawable/bg_room_gift"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_wheat_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_37"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toStartOf="@+id/rl_pit_one"
|
||||
tools:listitem="@layout/item_room_gift" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_pit_one"
|
||||
android:layout_width="@dimen/dp_72"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_all_wheat"
|
||||
android:layout_width="@dimen/dp_72"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="@drawable/text_bg_x"
|
||||
android:gravity="center"
|
||||
android:text="全麦"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_rule"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||
app:tl_indicator_drawable="@color/transparent"
|
||||
app:tl_indicator_height="@dimen/dp_6"
|
||||
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||
app:tl_indicator_width="0dp"
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textSelectedSize="@dimen/sp_14"
|
||||
app:tl_textUnselectColor="#E9E9E9"
|
||||
app:tl_textsize="@dimen/sp_12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_wheat_layout"/>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_240"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/sliding_tab_layout"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_pager"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gf_t"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:src="@mipmap/gift_t"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reward_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_toEndOf="@+id/im_gf_t"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="23"
|
||||
android:textColor="@color/color_FF666666"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toEndOf="@+id/tv_reward_gift"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:text="去充值"
|
||||
android:textColor="#0DFFB9"
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:background="@mipmap/gift_mh"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_num"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/bg_r65_eff2f8"
|
||||
android:layout_centerVertical="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.qxcm.moduleutil.widget.MarqueeTextView
|
||||
android:id="@+id/tv_give_coin_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="x1"
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="@dimen/dp_211"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:gravity="left|center"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:text="盲盒规则"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_give"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r65_0dffb9"
|
||||
android:gravity="center"
|
||||
android:text="赠送"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF333333"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/iv_wf"
|
||||
android:layout_width="@dimen/dp_73"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:src="@mipmap/gift_wf" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_introduce"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="460dp"
|
||||
android:background="@drawable/bg_room_gift"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_wheat_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_37"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toStartOf="@+id/rl_pit_one"
|
||||
tools:listitem="@layout/item_room_gift" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_pit_one"
|
||||
android:layout_width="@dimen/dp_72"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_all_wheat"
|
||||
android:layout_width="@dimen/dp_72"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="@drawable/text_bg_x"
|
||||
android:gravity="center"
|
||||
android:text="全麦"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_wheat_layout"
|
||||
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||
app:tl_indicator_drawable="@color/transparent"
|
||||
app:tl_indicator_height="@dimen/dp_6"
|
||||
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||
app:tl_indicator_width="0dp"
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textSelectedSize="@dimen/sp_14"
|
||||
app:tl_textUnselectColor="#E9E9E9"
|
||||
app:tl_textsize="@dimen/sp_12" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_240"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/sliding_tab_layout" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_pager">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gf_t"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/gift_t" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reward_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_toEndOf="@+id/im_gf_t"
|
||||
android:text="23"
|
||||
android:textColor="@color/color_FF666666" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_toEndOf="@+id/tv_reward_gift"
|
||||
android:text="去充值"
|
||||
android:textColor="#0DFFB9"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_num"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/bg_r65_eff2f8">
|
||||
|
||||
<com.qxcm.moduleutil.widget.MarqueeTextView
|
||||
android:id="@+id/tv_give_coin_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="x1"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_give"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r65_0dffb9"
|
||||
android:gravity="center"
|
||||
android:text="赠送"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
86
moduleroom/src/main/res/layout/room_host_zb_dialog.xml
Normal file
86
moduleroom/src/main/res/layout/room_host_zb_dialog.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_tb_ffffff"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:text="您正在进行转币操作,请输入转币金额"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_35"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r100_hui">
|
||||
|
||||
<com.qxcm.moduleutil.widget.ClearEditText
|
||||
android:id="@+id/ed_room_name"
|
||||
android:hint="请输入转币金额"
|
||||
android:inputType="number"
|
||||
android:background="@drawable/bg_r100_hui"
|
||||
android:maxLength="10"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_toStartOf="@id/tv_percentage"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_percentage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:gravity="center_vertical|end"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_35"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:text="设置后主持人收益为主持期间房间收益的该百分比;\n若未设置,主持人收益由平台统一设置,当前为房间流水的1%"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_action"
|
||||
android:layout_width="221dp"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
android:background="@drawable/cs"
|
||||
android:text="确定"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -72,7 +72,7 @@
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="14sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top2"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_top2"
|
||||
@@ -87,7 +87,7 @@
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ll_vip2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top2_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/ll_vip2"
|
||||
@@ -177,7 +177,7 @@
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="14sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_top1"
|
||||
@@ -190,7 +190,7 @@
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top1_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
@@ -217,7 +217,7 @@
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="14sp"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top3"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_top3"
|
||||
@@ -262,7 +262,7 @@
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_top3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top3_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
@@ -272,7 +272,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_vip2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top2"
|
||||
@@ -299,7 +299,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_vip1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
@@ -326,7 +326,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_vip3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
android:singleLine="true"
|
||||
android:text="杭州吴亦凡又大又圆"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -91,8 +91,9 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/bnv_rank_list_rich"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/room_item_head"
|
||||
app:layout_constraintLeft_toRightOf="@+id/room_item_head"
|
||||
app:layout_constraintTop_toTopOf="@+id/room_item_head" />
|
||||
@@ -111,7 +112,7 @@
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8sp"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -227,7 +227,8 @@
|
||||
android:layout_toEndOf="@+id/rl"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout="@layout/top_overlay_buttons"/>
|
||||
android:layout="@layout/top_overlay_buttons"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@@ -6,7 +6,7 @@
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_action_ys"
|
||||
android:id="@+id/im_action_js"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/action_ys"
|
||||
@@ -16,7 +16,7 @@
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_action_js"
|
||||
android:id="@+id/im_action_ys"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/action_js"
|
||||
|
||||
Reference in New Issue
Block a user