1:新版定包版本
This commit is contained in:
@@ -92,6 +92,10 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
||||
|
||||
@Override
|
||||
public void redPacketDetail(RedpacketDetail redpacketDetail) {
|
||||
// 检查 Activity 是否已经销毁
|
||||
if (isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
if (redpacketDetail != null) {
|
||||
ImageUtils.loadHeadCC(redpacketDetail.getRedpacket_info().getAvatar(), mBinding.userAvatar);
|
||||
mBinding.userName.setText(redpacketDetail.getRedpacket_info().getNickname());
|
||||
@@ -100,7 +104,7 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
||||
if (redpacketDetail.getMy_record() != null) {
|
||||
mBinding.tvRedJb.setText(redpacketDetail.getMy_record().getAmount());
|
||||
}
|
||||
mBinding.tvLq.setText(redpacketDetail.getRecords().size() + "/" + redpacketDetail.getRedpacket_info().getTotal_count());
|
||||
mBinding.tvLq.setText("已领取"+redpacketDetail.getRecords().size() + "/" + redpacketDetail.getRedpacket_info().getTotal_count());
|
||||
redAdapter.setNewData(redpacketDetail.getRecords());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ import com.xscm.moduleutil.rtc.AgoraManager
|
||||
import com.xscm.moduleutil.rtc.MusicPlayBean
|
||||
import com.xscm.moduleutil.service.MyRoomSingleton
|
||||
import com.xscm.moduleutil.utils.*
|
||||
import com.xscm.moduleutil.view.QXRedBagSendView
|
||||
import com.xscm.moduleutil.widget.*
|
||||
import com.xscm.moduleutil.widget.ViewUtils.OnViewCreatedListener
|
||||
import com.xscm.moduleutil.widget.floatingView.Floa
|
||||
@@ -906,6 +905,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
mBinding!!.drvRed.visibility = View.GONE
|
||||
mBinding!!.redBj.setOnClickListener {
|
||||
if(qxRedPacketManager!!.getAllRedPackets().size==1){
|
||||
redPacketInfo = qxRedPacketManager!!.getAllRedPackets().get(0)
|
||||
if (qxRedPacketManager!!.getAllRedPackets().get(0)!=null && qxRedPacketManager!!.getAllRedPackets().get(0).is_qiang==1){
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_RED_RESULT).withString("redpacketId", qxRedPacketManager!!.getAllRedPackets().get(0).getRedpacket_id()).navigation();
|
||||
}else {
|
||||
redEnvelopesFragment = RedEnvelopesFragment(this@RoomActivity)
|
||||
redEnvelopesFragment!!.setIsCollectedRoom(mRoomUserBean!!.is_collect == 1)
|
||||
redEnvelopesFragment!!.setFromToComment(false)
|
||||
redEnvelopesFragment!!.setRedPacket(qxRedPacketManager!!.getAllRedPackets().get(0))
|
||||
redEnvelopesFragment!!.show()
|
||||
}
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
redListDialog = RedListDialog(this)
|
||||
redListDialog!!.setOnRedPacketClickListener(object : RedListDialog.OnRedPacketClickListener {
|
||||
|
||||
@@ -1541,9 +1554,38 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
} else if (msgType == 1060) {
|
||||
qxRedPacketManager!!.addRedPacket(messageEvent.text.redpacketInfo)
|
||||
}else if (msgType == 1061){
|
||||
qxRedPacketManager!!.removeRedPacket(messageEvent.text.redpacket_id)
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onMessageEvent(messageEvent: MqttXlhEnd) {
|
||||
val xlhBean: XLHBean = GsonUtils.fromJson<XLHBean>(messageEvent.message, XLHBean::class.java)
|
||||
if(xlhBean.from_type==100){
|
||||
if (xlhBean.xlh_data != null) {
|
||||
if (xlhBean.xlh_data.status == 1) {
|
||||
mBinding!!.xlhRk.visibility = View.VISIBLE
|
||||
xlhDjs(xlhBean.xlh_data.end_time)
|
||||
} else {
|
||||
mBinding!!.xlhRk.visibility = View.INVISIBLE
|
||||
releaseCountDownTimer1()
|
||||
}
|
||||
}
|
||||
}else if(xlhBean.from_type==103){
|
||||
val existingFragment =
|
||||
supportFragmentManager.findFragmentByTag("TourClubDialogFragment") as TourClubDialogFragment?
|
||||
if (existingFragment != null && existingFragment.isVisible) {
|
||||
existingFragment.onMessageReceived(messageEvent)
|
||||
} else {
|
||||
LogUtils.e("TourClubDialogFragment", "巡乐会界面未打开")
|
||||
// EventBus.getDefault().post(messageEvent)
|
||||
}
|
||||
xlhDjs(xlhBean.end_time)
|
||||
}else if(xlhBean.from_type==104){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private var endTime: Long = 0
|
||||
|
||||
@@ -2609,7 +2651,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// mBinding.inputMenu1.bringToFront(); // 强制将该 View 置于最上层
|
||||
// mBinding.inputMenu1.show();
|
||||
|
||||
dialogDismiss()
|
||||
dialogDismiss(1)
|
||||
}
|
||||
} else if (id == R.id.rl_mic) {
|
||||
if (mRoomInfoResp!!.user_info.is_mute_pit != null && mRoomInfoResp!!.user_info.is_mute_pit == "1") {
|
||||
@@ -3100,7 +3142,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
@SuppressLint("MissingInflatedId")
|
||||
fun dialogDismiss() {
|
||||
fun dialogDismiss(type:Int) {
|
||||
// // 使用 AlertDialog.Builder
|
||||
|
||||
val builder = AlertDialog.Builder(this)
|
||||
@@ -3152,13 +3194,25 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
etContent.setText("")
|
||||
countDownTimer()
|
||||
if (redEnvelopesFragment != null) {
|
||||
redEnvelopesFragment = RedEnvelopesFragment(this@RoomActivity)
|
||||
redEnvelopesFragment!!.setIsCollectedRoom(mRoomUserBean!!.is_collect == 1)
|
||||
redEnvelopesFragment!!.setFromToComment(true)
|
||||
redEnvelopesFragment!!.setRedPacket(redPacketInfo)
|
||||
redEnvelopesFragment!!.show()
|
||||
if(type==2) {
|
||||
if (redPacketInfo != null){
|
||||
LogUtils.e("输入口令红包",redPacketInfo)
|
||||
LogUtils.e("输入口令红包","# 口令红包 "+redPacketInfo!!.password,"inputSting",inputSting)
|
||||
if (intRed_num==null || intRed_num!!.isEmpty()){
|
||||
return@OnClickListener
|
||||
}
|
||||
if (inputSting!!.toString() == intRed_num.toString()){
|
||||
if (redEnvelopesFragment != null) {
|
||||
redEnvelopesFragment = RedEnvelopesFragment(this@RoomActivity)
|
||||
redEnvelopesFragment!!.setIsCollectedRoom(mRoomUserBean!!.is_collect == 1)
|
||||
redEnvelopesFragment!!.setFromToComment(true)
|
||||
redEnvelopesFragment!!.setRedPacket(redPacketInfo)
|
||||
redEnvelopesFragment!!.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
inputSting = ""
|
||||
dialog.dismiss()
|
||||
})
|
||||
|
||||
@@ -3171,9 +3225,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (inputSting != null) {
|
||||
etContent.setText(inputSting)
|
||||
}
|
||||
// 监听对话框关闭事件
|
||||
dialog.setOnDismissListener {
|
||||
// 对话框关闭时执行的代码
|
||||
inputSting=""
|
||||
LogUtils.e("AlertDialog已关闭")
|
||||
}
|
||||
dialog.show()
|
||||
addActiveDialog(dialog) // 添加到管理列表
|
||||
inputSting = ""
|
||||
|
||||
}
|
||||
|
||||
private fun countDownTimer() {
|
||||
@@ -3198,15 +3258,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
var inputSting: String? = null
|
||||
var intRed_num: String? = null
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun roomInfoEvent(messageEvent: UserInfo) {
|
||||
if (messageEvent != null && messageEvent.red_num != null) {
|
||||
inputSting = messageEvent.red_num
|
||||
} else {
|
||||
inputSting ="# 口令红包 "+ messageEvent.red_num
|
||||
intRed_num=inputSting
|
||||
dialogDismiss(2)
|
||||
} else if (messageEvent!=null && messageEvent.ta != null){
|
||||
intRed_num=""
|
||||
inputSting = "@" + messageEvent.nickname
|
||||
dialogDismiss(1)
|
||||
}
|
||||
dialogDismiss()
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -3683,44 +3748,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
MvpPre!!.postRoomInfo(CommonAppContext.getInstance().playId)
|
||||
}
|
||||
|
||||
// // 正常启动或从后台恢复
|
||||
// if (isInBackground) {
|
||||
// isInBackground = false;
|
||||
// // 从后台回到前台时调用
|
||||
// if (MvpPre != null && roomId != null) {
|
||||
// if (mRoomInfoResp != null && mRoomInfoResp.getRoom_info() != null) {
|
||||
// if (mRoomInfoResp.getRoom_info().getType_id().equals("1")
|
||||
// || mRoomInfoResp.getRoom_info().getType_id().equals("3") ||
|
||||
// mRoomInfoResp.getRoom_info().getType_id().equals("4")||
|
||||
// mRoomInfoResp.getRoom_info().getType_id().equals("8")) {
|
||||
// if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
//
|
||||
// } else {
|
||||
// MvpPre.postRoomInfo(roomId);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// MvpPre.postRoomInfo(roomId);
|
||||
// }
|
||||
// } else {
|
||||
// ToastUtils.showLong("您已经掉线,需要重新进入房间!");
|
||||
// ARouter.getInstance().build(ARouteConstants.ME)
|
||||
// .navigation();
|
||||
// cleanupResources();
|
||||
// finish();
|
||||
// }
|
||||
// }
|
||||
// if (appStateListener != null && appStateListener.isAppInBackground()) {
|
||||
// MvpPre.postRoomInfo(roomId);
|
||||
// }
|
||||
|
||||
|
||||
// 检查是否从最小化状态恢复
|
||||
if (isMinimized) {
|
||||
isMinimized = false
|
||||
clearMinimizeState()
|
||||
|
||||
|
||||
// 恢复房间状态
|
||||
resumeRoomState()
|
||||
setupEffectView()
|
||||
@@ -4207,7 +4238,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
cleanupResources()
|
||||
}
|
||||
if (qxRedPacketManager != null) {
|
||||
qxRedPacketManager!!.endCheckTimer();
|
||||
qxRedPacketManager!!.destroyRedpacketInfo()
|
||||
}
|
||||
// 确保父类的 onDestroy 被调用
|
||||
super.onDestroy()
|
||||
@@ -4554,6 +4585,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// 处理移除红包的逻辑
|
||||
if (remainingCount == 0) {
|
||||
mBinding!!.drvRed.visibility = View.GONE
|
||||
qxRedPacketManager!!.removeAllRedPackets()
|
||||
} else {
|
||||
mBinding!!.drvRed.visibility = View.VISIBLE
|
||||
}
|
||||
@@ -4583,21 +4615,29 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (redEnvelopesFragment!!.mRedPacketInfo.conditions.contains("1")) {
|
||||
//有收藏房间条件
|
||||
if (mRoomInfoResp!!.user_info.is_collect == 1) {
|
||||
//需要满足收藏在倒计时
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
if(packet!!.redpacket_id==redEnvelopesFragment!!.mRedPacketInfo.redpacket_id) {
|
||||
//需要满足收藏在倒计时
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
if(packet!!.redpacket_id==redEnvelopesFragment!!.mRedPacketInfo.redpacket_id) {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (redEnvelopesFragment!!.isFromToComment) {
|
||||
if (redEnvelopesFragment!!.mRedPacketInfo.conditions.contains("1")) {
|
||||
//有收藏房间条件
|
||||
if (mRoomInfoResp!!.user_info.is_collect == 1) {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
if(packet!!.redpacket_id==redEnvelopesFragment!!.mRedPacketInfo.redpacket_id) {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
if(packet!!.redpacket_id==redEnvelopesFragment!!.mRedPacketInfo.redpacket_id) {
|
||||
redEnvelopesFragment!!.setNeedTime(packetTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,7 @@ public class RedBagAdapter extends BaseQuickAdapter<RedPacketInfo, BaseViewHolde
|
||||
ImageView iv_red_bag= helper.getView(R.id.iv_red_bag);
|
||||
if (item.getIs_qiang()==1){
|
||||
iv_red_bag.setImageResource(com.xscm.moduleutil.R.mipmap.red_bj_h);
|
||||
helper.setVisible(R.id.tv_user_name,false);
|
||||
helper.setVisible(R.id.tv_djs,false);
|
||||
helper.setText(R.id.tv_djs, "已领取");
|
||||
}else {
|
||||
iv_red_bag.setImageResource(com.xscm.moduleutil.R.mipmap.red);
|
||||
|
||||
|
||||
@@ -44,19 +44,25 @@ public class RoomHourlyAdapter extends BaseQuickAdapter<RoomHourBean.RoomListBea
|
||||
|
||||
ImageUtils.loadHeadCC(roomListBean.getRoom_cover(), baseViewHolder.getView(R.id.room_tx));
|
||||
if (roomListBean.getXlh_status()==1){
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.getView(R.id.tv_sta).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.GONE);
|
||||
baseViewHolder.getView(R.id.tv_sta).setVisibility(View.GONE);
|
||||
baseViewHolder.setText(R.id.tv_sta, "进行中");
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_sta, com.xscm.moduleutil.R.mipmap.jxz);
|
||||
}else if (roomListBean.getXlh_status()==2){
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.getView(R.id.tv_sta).setVisibility(View.VISIBLE);
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.GONE);
|
||||
baseViewHolder.getView(R.id.tv_sta).setVisibility(View.GONE);
|
||||
baseViewHolder.setText(R.id.tv_sta, "即将开始");
|
||||
baseViewHolder.setBackgroundRes(R.id.tv_sta, com.xscm.moduleutil.R.mipmap.jiks);
|
||||
}else {
|
||||
baseViewHolder.getView(R.id.im_xlh).setVisibility(View.GONE);
|
||||
baseViewHolder.getView(R.id.tv_sta).setVisibility(View.GONE);
|
||||
}
|
||||
if (roomListBean.getRedpacket_status()==0){
|
||||
baseViewHolder.getView(R.id.im_red).setVisibility(View.GONE);
|
||||
}else {
|
||||
baseViewHolder.getView(R.id.im_red).setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
baseViewHolder.setText(R.id.room_name, roomListBean.getRoom_name());
|
||||
ImageUtils.loadHeadCC(roomListBean.getLabel_icon(), baseViewHolder.getView(R.id.iv_type));
|
||||
baseViewHolder.setText(R.id.room_hr, roomListBean.getTotal_price()+"");
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.example.moduleroom.R;
|
||||
import com.example.moduleroom.databinding.DialogRedBagSendBinding;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
@@ -49,6 +50,8 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
return R.layout.dialog_red_bag_send;
|
||||
}
|
||||
|
||||
private boolean diaj=false;
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
|
||||
@@ -56,7 +59,8 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
// window.setLayout(345, 454);
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
// window.setLayout((int) (ScreenUtils.getScreenWidth() * 345.f / 345), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 0.9), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
setView(1);
|
||||
mBinding.edText.setKeyListener(DigitsKeyListener.getInstance("0123456789"));
|
||||
@@ -67,7 +71,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
public void onClick(View v) {
|
||||
if (type != 3) {
|
||||
setView(3);
|
||||
setWebView("https://www.baidu.com");
|
||||
setWebView(CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"api/Page/page_show?id=25");
|
||||
} else {
|
||||
setView(stype);
|
||||
}
|
||||
@@ -85,25 +89,38 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mBinding.butSub.getText().equals("下一步")) {
|
||||
if (redType==2){
|
||||
if (TextUtils.isEmpty(mBinding.evKl.getText().toString().trim())){
|
||||
ToastUtils.show("请输入口令");
|
||||
return;
|
||||
}
|
||||
}
|
||||
setView(2);
|
||||
setFRed();
|
||||
} else {
|
||||
if (diaj){
|
||||
return;
|
||||
}
|
||||
diaj=true;
|
||||
// 验证输入
|
||||
String numStr = mBinding.etNum.getText().toString().trim();
|
||||
String textStr = mBinding.edText.getText().toString().trim();
|
||||
|
||||
// 检查是否为空
|
||||
if (TextUtils.isEmpty(numStr)) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入数量");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(textStr)) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入金额");
|
||||
return;
|
||||
}
|
||||
if (redType==2){
|
||||
if (TextUtils.isEmpty(mBinding.evKl.getText().toString().trim())){
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入口令");
|
||||
return;
|
||||
}
|
||||
@@ -115,6 +132,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
int text = Integer.parseInt(textStr);
|
||||
|
||||
if (text <= num) {
|
||||
diaj=false;
|
||||
ToastUtils.show("金额必须大于数量");
|
||||
return;
|
||||
}
|
||||
@@ -123,6 +141,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
sendRedPacket();
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入有效的数字");
|
||||
return;
|
||||
}
|
||||
@@ -233,16 +252,19 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
|
||||
// 验证输入
|
||||
if (TextUtils.isEmpty(numStr)) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入数量");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(textStr)) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入金额");
|
||||
return;
|
||||
}
|
||||
|
||||
if (redType == 2 && TextUtils.isEmpty(kl)) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入口令");
|
||||
return;
|
||||
}
|
||||
@@ -252,6 +274,7 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
int text = Integer.parseInt(textStr);
|
||||
|
||||
if (text <= num) {
|
||||
diaj=false;
|
||||
ToastUtils.show("金额必须大于数量");
|
||||
return;
|
||||
}
|
||||
@@ -274,12 +297,14 @@ public class RedBagSendDialog extends BaseDialog<DialogRedBagSendBinding> {
|
||||
@Override
|
||||
public void onNext(@NotNull String redPacketBean) {
|
||||
ToastUtils.show("发送成功");
|
||||
diaj=false;
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
diaj=false;
|
||||
ToastUtils.show("请输入有效的数字");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
||||
Window window = getWindow();
|
||||
qxRedPacketManager=QXRedPacketManager.getInstance();
|
||||
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 0.8), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
// window.setLayout((int) (ScreenUtils.getScreenWidth() * 375.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 3); // 每行显示3个
|
||||
mBinding.recyclerView.setLayoutManager(layoutManager);
|
||||
@@ -88,7 +89,7 @@ public class RedListDialog extends BaseDialog<DialogRedListBinding> {
|
||||
int maxRows = Math.min(rows, 2);
|
||||
|
||||
// 计算总高度:2行 × item高度 + 间距
|
||||
int itemHeight = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_60);
|
||||
int itemHeight = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_80);
|
||||
int spacing = getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_10);
|
||||
int totalHeight = maxRows * itemHeight + (maxRows + 1) * spacing;
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
.create()
|
||||
.showAsDropDown(mBinding.roomMCz, 0, 20);
|
||||
} else if (id == R.id.im_room_t) {
|
||||
userInfo.setTa("1");
|
||||
EventBus.getDefault().post(userInfo);
|
||||
dismiss();
|
||||
} else if (id == R.id.im_room_lt) {
|
||||
|
||||
@@ -890,6 +890,7 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
case 1057:
|
||||
case 1059:
|
||||
case 1060:
|
||||
case 1061:
|
||||
case 1025:
|
||||
case 1058:
|
||||
// EventBus.getDefault().post(message);
|
||||
|
||||
@@ -608,8 +608,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:text="名称"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
tools:text="名称"
|
||||
android:textColor="#FFFF0B"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
@@ -620,9 +621,10 @@
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="内容"
|
||||
tools:text="内容"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headName"/>
|
||||
|
||||
@@ -5,18 +5,20 @@
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="454dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/red_f_bj"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
@@ -67,7 +69,8 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@drawable/bg_r8_fff"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hiti"
|
||||
@@ -211,7 +214,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
@@ -226,7 +229,7 @@
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="#fff"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
android:text="1分钟"/>
|
||||
@@ -238,7 +241,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
@@ -252,7 +255,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
@@ -266,7 +269,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="#fff"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:background="@drawable/selector_red_bag_radio_button"
|
||||
@@ -364,6 +367,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_red_close"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_red_close"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
<!-- 金额 -->
|
||||
@@ -378,6 +382,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<TextView
|
||||
@@ -434,6 +439,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<TextView
|
||||
@@ -489,7 +495,8 @@
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -510,16 +517,18 @@
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:layout_marginStart="@dimen/dp_15">
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_10">
|
||||
|
||||
<!-- 无 -->
|
||||
<Button
|
||||
android:id="@+id/bt_none"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="0.8"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="无"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
@@ -528,11 +537,12 @@
|
||||
<!-- 收藏房间 -->
|
||||
<Button
|
||||
android:id="@+id/bt_favorite_room"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="收藏房间"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
@@ -541,11 +551,12 @@
|
||||
<!-- 仅麦上用户 -->
|
||||
<Button
|
||||
android:id="@+id/bt_mic_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="仅麦上用户"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:background="@drawable/selector_red_bag_condition_button"
|
||||
@@ -565,6 +576,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:text="已领取5/10"
|
||||
tools:text="已领取5/10"
|
||||
android:textColor="#999"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -41,6 +41,20 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:background="@mipmap/hourly_d"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_red"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/red_bj"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/im_xlh"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_xlh"
|
||||
@@ -53,6 +67,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -66,7 +81,8 @@
|
||||
android:background="@mipmap/jxz"
|
||||
android:gravity="center"
|
||||
tools:text="进行中"
|
||||
android:textSize="@dimen/sp_10"/>
|
||||
android:textSize="@dimen/sp_10"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
|
||||
Reference in New Issue
Block a user