个人信息显示,签约1035添加

This commit is contained in:
2025-12-04 14:25:09 +08:00
parent 885f981b6f
commit 64f538f04d
2 changed files with 47 additions and 41 deletions

View File

@@ -1,11 +1,8 @@
package com.xscm.modulemain.activity.room.fragment
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.os.Vibrator
import android.view.Gravity
import android.view.HapticFeedbackConstants
import android.view.LayoutInflater
import android.view.View
import android.widget.PopupWindow
@@ -238,6 +235,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
R.id.tv_time_right -> {
MvpPre.signEnd(mSignId!!)
}
R.id.iv_help -> {
//签约规则
val bundle = Bundle()
@@ -417,6 +415,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
override fun signCoinList(list: List<String>) {
MvpPre!!.wallet(list)
}
override fun wallet(list: List<String>, walletBean: WalletBean?) {
if (dialogMentorShip == null) {
dialogMentorShip = DialogMentorShip(ActivityUtils.getTopActivity())
@@ -481,7 +480,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
fun event1035(messageEvent: RoomMessageEvent) {
val fromUserId = messageEvent.text.fromUserInfo.user_id
val viewPos = indexList.indexOf(fromUserId.toString())
val pitBean = mRoomInfo?.room_info?.pit_list!![indexList[viewPos].toInt() - 1]
viewList[viewPos].setData(pitBean)
}
fun event1039(messageEvent: RoomMessageEvent) {
@@ -633,11 +635,8 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
}
fun event1005(message: RoomMessageEvent) {
// 检查是否有多个用户信息
if (message.text.toUserInfos != null && !message.text.toUserInfos.isEmpty()
) {
if (!message.text.toUserInfos.isNullOrEmpty()) {
// 处理多个用户的情况
for (userOnlineStatusBean in message.text.toUserInfos) {
updateCharmForUser(userOnlineStatusBean)

View File

@@ -535,6 +535,43 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
}
private void showCp() {
if (userInfo.getUser_id() == SpUtil.getUserId()){
mBinding.imRoomGz.setVisibility(GONE);
}else {
mBinding.imRoomGz.setVisibility(VISIBLE);
}
if (!userInfo.getIcon().isEmpty()) {
mBinding.flexEntry.setVisibility(VISIBLE);
for (String url : userInfo.getIcon()) {
if (url.contains("http")) {
ImageView imageView1 = new ImageView(Application.getInstance());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
);
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
imageView1.setLayoutParams(params);
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
// 使用 Glide 加载图片
ImageUtils.loadHeadCC(url, imageView1, params);
mBinding.flexEntry.addView(imageView1);
}
}
} else {
mBinding.flexEntry.setVisibility(GONE);
}
if (userInfo.getProfile().isEmpty()) {
mBinding.jianj.setText("");
mBinding.jianj.setVisibility(GONE);
} else {
mBinding.jianj.setText(userInfo.getProfile());
mBinding.jianj.setVisibility(VISIBLE);
}
if (userInfo.getCp_info() != null) {
mBinding.ll.setVisibility(VISIBLE);
@@ -563,36 +600,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
mBinding.cpAnim.setMute(true);
mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1);
if (userInfo.getProfile().isEmpty()) {
mBinding.jianj.setText("");
mBinding.jianj.setVisibility(GONE);
} else {
mBinding.jianj.setText(userInfo.getProfile());
mBinding.jianj.setVisibility(VISIBLE);
}
if (!userInfo.getIcon().isEmpty()) {
mBinding.flexEntry.setVisibility(VISIBLE);
for (String url : userInfo.getIcon()) {
if (url.contains("http")) {
ImageView imageView1 = new ImageView(Application.getInstance());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
);
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
imageView1.setLayoutParams(params);
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
// 使用 Glide 加载图片
ImageUtils.loadHeadCC(url, imageView1, params);
mBinding.flexEntry.addView(imageView1);
}
}
} else {
mBinding.flexEntry.setVisibility(GONE);
}
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1);
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2);