1:修改点唱房的页面展示问题

2:修改家族展示的问题
This commit is contained in:
2025-11-28 19:01:37 +08:00
parent 2b750c5f06
commit 847c768e4d
9 changed files with 66 additions and 20 deletions

View File

@@ -1488,6 +1488,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|| msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomNextSongDidChanged
) { //点歌房下一首歌曲发生变化
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
if(messageEvent?.text?.song_info!=null){
mRoomInfoResp?.singer_info?.song_info = messageEvent.text.song_info
}else{
mRoomInfoResp?.singer_info?.song_info =null
}
roomFragment?.upRoomInfo(mRoomInfoResp)
roomFragment!!.handleRoomMessage(messageEvent)
}
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCPText) {
@@ -1786,7 +1792,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
RoomType.JUKEBOX -> {
mBinding!!.rlMore.visibility = View.GONE
mBinding!!.rlMisc.visibility = View.GONE
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
getPitBean(messageEvent, 1)
roomFragment!!.upRoomInfoData(mRoomInfoResp)
roomFragment?.handleRoomMessage(messageEvent)
}
RoomType.SIGN_CONTRACT -> {
@@ -1885,7 +1893,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
roomFragment!!.upRoomInfoData(mRoomInfoResp)
roomFragment!!.handleRoomMessage(messageEvent)
}
RoomType.JUKEBOX -> {
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
getPitBean(messageEvent, 1)
roomFragment!!.upRoomInfoData(mRoomInfoResp)
roomFragment?.handleRoomMessage(messageEvent)
}
else -> {
roomFragment!!.updateSeatViewExchangedWithPitArray(mRoomInfoResp)
}
@@ -3812,6 +3825,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
setView(resp, true)
}
fun upRoomInfoFragment(resp: RoomInfoResp?) {
this.mRoomInfoResp= resp
}
fun upHeight() {
if (mRoomInfoResp?.room_info?.type_id == "1" || mRoomInfoResp?.room_info?.type_id == "3" || mRoomInfoResp?.room_info?.type_id == "4"
|| mRoomInfoResp?.room_info?.type_id == "8"

View File

@@ -28,6 +28,8 @@ public class RoomJukeboxAdapter extends BaseQuickAdapter<RoomPitBean, BaseViewHo
RoomJukeboxWheatView roomJukeboxWheatView= helper.getView(R.id.wheatView);
// 确保pitNumber与数据匹配而不是使用位置
roomJukeboxWheatView.setRoomWheatNumber(item.getPit_number());
roomJukeboxWheatView.isMentorShip(false);
roomJukeboxWheatView.setImageType(item.isImageType());
roomJukeboxWheatView.setData(item);
roomJukeboxWheatView.setOnClickListener(v -> {

View File

@@ -915,6 +915,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
}
case CABIN:
break;
default:
LogUtils.w("Unhandled room type: " + qxRoomSeatViewType);
break;

View File

@@ -383,6 +383,7 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
} else if (roomPitBean.getPit_number().equals("9")) {
// 确保视图的pitNumber与数据的pit_number匹配
mBinding.wvZc.setRoomWheatNumber("9");
mBinding.wvZc.isMentorShip(true);
mBinding.wvZc.setData(roomPitBean);
}
}
@@ -605,6 +606,14 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
if (pitNumber.equals("9")) {
mBinding.wvZc.setRoomWheatNumber("9");
mBinding.wvZc.setData(pitBean);
roomInfoResp.getRoom_info().getPit_list().set(8, pitBean);
if (fromUserInfo.getUser_id() == SpUtil.getUserId()) {
myPitNumber = Integer.parseInt(pitNumber);
if (pitNumber.equals("9")) {
configGameOptionBtn();
}
}
}
RoomPitBean temp = dataList.get(fromIndex);
temp.setUser_id("");
@@ -639,6 +648,19 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
adapter.getData().addAll(dataList);
adapter.notifyItemChanged(fromIndex);
adapter.notifyItemChanged(toIndex);
List<RoomPitBean> pitList = roomInfoResp.getRoom_info().getPit_list();
if (pitList != null && dataList != null) {
for (int i = 0; i < Math.min(pitList.size(), dataList.size()); i++) {
pitList.set(i, dataList.get(i));
}
}
if (parentFragment != null) {
parentFragment.upRoomInfo(roomInfoResp);
}
if (getActivity() instanceof RoomActivity) {
((RoomActivity) getActivity()).upRoomInfoFragment(roomInfoResp);
}
}
/**

View File

@@ -32,7 +32,7 @@ class MyFamilyAdapter(
interface OnItemClickListener {
fun onItemClick(position: Int, item: MyFamilyBean.GroupMembersListsBean)
}
private var onItemClickListener: OnItemClickListener? = null
// 设置点击事件监听器
@@ -78,9 +78,9 @@ class MyFamilyAdapter(
}
if (userId == SpUtil.getUserId()) {
if (item.is_show_sign==0){
helper.setGone(R.id.tv_renew,false)
helper.setVisible(R.id.tv_renew,false)
}else{
helper.setGone(R.id.tv_renew,true)
helper.setVisible(R.id.tv_renew,true)
}
}

View File

@@ -76,7 +76,7 @@ public class RoomJukeboxWheatView extends BaseWheatView {
handleOffState(bean);
}
iv_tag_type.setVisibility(bean.isImageType()?VISIBLE:GONE);
// iv_tag_type.setVisibility(bean.isImageType()?VISIBLE:GONE);
iv_tag_type.setImageResource(com.xscm.moduleutil.R.mipmap.mu_yc);
}
@@ -106,8 +106,6 @@ public class RoomJukeboxWheatView extends BaseWheatView {
mIvFrame.setSource(bean.getDress(), 3);
}
// if(pitNumber.equals("9")){
// iv_tag_type.setVisibility(GONE);
// mTvName.setBackgroundColor(com.xscm.moduleutil.R.color.transparent);

View File

@@ -113,12 +113,13 @@
android:id="@+id/wv_zc"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_6"
android:layout_marginVertical="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="@+id/im_host"
app:layout_constraintTop_toTopOf="@+id/im_host"
app:layout_constraintStart_toStartOf="@+id/im_host"
app:layout_constraintEnd_toEndOf="@+id/im_host"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintDimensionRatio="0.8:1"
app:room_wheat_number="9" />

View File

@@ -7,7 +7,7 @@
android:layout_marginVertical="@dimen/dp_6"
android:background="@drawable/bg_r12_fffac5_f9e9ff_c7d3fa">
<com.makeramen.roundedimageview.RoundedImageView
<com.xscm.moduleutil.utils.MeHeadView
android:id="@+id/iv_head"
android:layout_width="@dimen/dp_52"
android:layout_height="@dimen/dp_52"
@@ -19,14 +19,15 @@
<com.xscm.moduleutil.widget.ShineTextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textStyle="bold"
android:maxEms="1011"
android:maxLines="1"
android:maxLength="20"
android:singleLine="true"
android:ellipsize="end"
android:textSize="@dimen/sp_16"
android:textSize="@dimen/sp_10"
app:isShine="false"
app:layout_constraintStart_toStartOf="@+id/iv_head"
app:layout_constraintTop_toBottomOf="@+id/iv_head"
@@ -214,8 +215,9 @@
android:textColor="@color/white"
android:background="@drawable/cs"
android:textSize="@dimen/sp_14"
app:layout_constraintHorizontal_weight="1"
android:gravity="center"/>
app:layout_constraintHorizontal_weight="0.8"
android:gravity="center"
android:visibility="invisible"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -18,11 +18,11 @@
android:id="@+id/avatar_container"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1:1.15"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.7"
app:layout_constraintWidth_percent="0.78"
android:clipChildren="false"
android:clipToPadding="false">
@@ -33,6 +33,8 @@
android:layout_height="0dp"
android:src="@mipmap/room_ic_owner_offline"
android:visibility="gone"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintWidth_percent="0.88"
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
app:layout_constraintEnd_toEndOf="@id/iv_frame"
app:layout_constraintStart_toStartOf="@id/iv_frame"
@@ -47,6 +49,7 @@
android:scaleType="fitCenter"
android:src="@mipmap/room_ic_wheat_default"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintWidth_percent="0.88"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -77,7 +80,7 @@
app:layout_constraintEnd_toEndOf="@id/iv_frame"
app:layout_constraintStart_toStartOf="@id/iv_frame"
app:layout_constraintTop_toTopOf="@id/iv_frame"
app:layout_constraintWidth_percent="1.3"
app:layout_constraintWidth_percent="1"
app:loopCount="0"
app:source="mic.svga" />
@@ -89,7 +92,7 @@
android:layout_marginEnd="@dimen/dp_2"
android:layout_marginBottom="@dimen/dp_2"
android:src="@mipmap/room_microphone_off"
android:visibility="visible"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
app:layout_constraintEnd_toEndOf="@id/iv_frame"
tools:visibility="visible" />