跨房PK:PK记分面板

This commit is contained in:
huangjian
2021-11-10 19:18:32 +08:00
parent a0e3d78894
commit 5c99b5bf6b
43 changed files with 1513 additions and 495 deletions

View File

@@ -0,0 +1,127 @@
package com.yizhuan.erban.avroom.anotherroompk
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.util.AttributeSet
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.FrameLayout
import android.widget.PopupWindow
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.lifecycle.Observer
import com.netease.nim.uikit.common.util.sys.ScreenUtil
import com.yizhuan.erban.R
import com.yizhuan.erban.databinding.LayoutRoomPkBoardViewBinding
import com.yizhuan.erban.ui.utils.ImageLoadUtils
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
import com.yizhuan.xchat_android_core.utils.CurrentTimeUtils
import com.yizhuan.xchat_android_library.utils.CommonUtils
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import java.text.SimpleDateFormat
import java.util.*
import java.util.concurrent.TimeUnit
class RoomPKBoardView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
private val binding = LayoutRoomPkBoardViewBinding.inflate(LayoutInflater.from(context))
private val observer = Observer<RoomPkBean> { updateView(it) }
private val simpleDateFormat = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
private var disposable: Disposable? = null
private var helpPopupWindow: PopupWindow? = null
init {
addView(binding.root, LayoutParams(ScreenUtil.dip2px(339f), ScreenUtil.dip2px(233f)))
AvRoomDataManager.get().roomPkLiveData.observeForever(observer)
binding.viewRankListCharmLeft.showCharmStyle()
binding.viewRankListCharmRight.showCharmStyle()
binding.pbScore.setThumbRes(R.drawable.ic_room_pk_pb_indicator)
binding.ivDetails.setOnClickListener {
if (CommonUtils.isFastDoubleClick(1000)) return@setOnClickListener
binding.groupRank.isVisible = !binding.groupRank.isVisible
if (binding.groupRank.isVisible) {
binding.root.setBackgroundResource(R.drawable.bg_room_pk_board)
binding.root.updateLayoutParams<LayoutParams> {
width = ScreenUtil.dip2px(339f)
height = ScreenUtil.dip2px(233f)
}
} else {
binding.root.setBackgroundResource(R.drawable.bg_room_pk_board_small)
binding.root.updateLayoutParams<LayoutParams> {
width = ScreenUtil.dip2px(339f)
height = ScreenUtil.dip2px(137f)
}
}
binding.ivDetails.animate().rotationBy(180f).start()
}
binding.ivHelp.setOnClickListener {
showHelpPopup(binding.ivHelp)
}
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
AvRoomDataManager.get().roomPkLiveData.removeObserver(observer)
disposable?.dispose()
}
@SuppressLint("SetTextI18n")
private fun updateView(roomPkBean: RoomPkBean?) {
if (roomPkBean == null) return
binding.tvRoomNameLeft.text = roomPkBean.cTitle
ImageLoadUtils.loadImage(context, roomPkBean.cAvatar, binding.ivAvatarLeft)
binding.viewRankListCharmLeft.updateData(roomPkBean.crRank)
binding.viewRankListContributeLeft.updateData(roomPkBean.csRank)
binding.tvRoomNameRight.text = roomPkBean.aTitle
ImageLoadUtils.loadImage(context, roomPkBean.aAvatar, binding.ivAvatarRight)
binding.viewRankListCharmRight.updateData(roomPkBean.arRank)
binding.viewRankListContributeRight.updateData(roomPkBean.asRank)
binding.pbScore.progress = (roomPkBean.cPercent * 100).toInt()
binding.tvScoreLeft.text = "${roomPkBean.cAmount}"
binding.tvScoreRight.text = "${roomPkBean.aAmount}"
disposable?.dispose()
disposable = Observable.interval(1, TimeUnit.SECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
binding.tvTime.text =
simpleDateFormat.format(roomPkBean.endTime - CurrentTimeUtils.getCurrentTime())
}
}
private fun showHelpPopup(parent: View) {
val contentView: View
if (helpPopupWindow == null) {
contentView =
LayoutInflater.from(context).inflate(R.layout.layout_room_pk_help_view, null)
helpPopupWindow =
PopupWindow(contentView, ScreenUtil.dip2px(244f), ScreenUtil.dip2px(177f))
helpPopupWindow?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
}
helpPopupWindow?.isOutsideTouchable = true
val vLoc = IntArray(2)
parent.getLocationInWindow(vLoc)
try {
helpPopupWindow?.showAtLocation(
binding.root,
Gravity.START,
ScreenUtil.dip2px(75f),
-ScreenUtil.dip2px(33f)
)
} catch (e: Exception) {
e.printStackTrace()
}
}
}

View File

@@ -0,0 +1,44 @@
package com.yizhuan.erban.avroom.anotherroompk
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.yizhuan.erban.R
import com.yizhuan.erban.databinding.LayoutRoomPkRankListViewBinding
import com.yizhuan.erban.ui.utils.ImageLoadUtils
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean
class RoomPKRankListView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
private val binding = LayoutRoomPkRankListViewBinding.inflate(LayoutInflater.from(context))
private val tvValues = arrayOf(binding.tvValue1, binding.tvValue2, binding.tvValue3)
private val ivAvatars = arrayOf(binding.ivAvatar1, binding.ivAvatar2, binding.ivAvatar3)
init {
addView(binding.root)
}
fun showCharmStyle() {
binding.tvValue1.setBackgroundResource(R.drawable.bg_room_pk_charm)
binding.tvValue2.setBackgroundResource(R.drawable.bg_room_pk_charm)
binding.tvValue3.setBackgroundResource(R.drawable.bg_room_pk_charm)
binding.viewBg1.setBackgroundResource(R.drawable.bg_room_pk_rank_charm1)
binding.viewBg2.setBackgroundResource(R.drawable.bg_room_pk_rank_charm2)
binding.viewBg3.setBackgroundResource(R.drawable.bg_room_pk_rank_charm2)
}
fun updateData(data: List<RoomPkBean.RankBean>?) {
for (i in tvValues.indices) {
tvValues[i].text = data?.getOrNull(i)?.amount ?: "0"
ImageLoadUtils.loadImage(
context,
data?.getOrNull(i)?.avatar,
ivAvatars[i],
R.drawable.default_avatar
)
}
}
}

View File

@@ -0,0 +1,74 @@
package com.yizhuan.erban.avroom.anotherroompk
import android.annotation.SuppressLint
import android.os.Bundle
import androidx.core.view.isVisible
import com.yizhuan.erban.base.BaseDialog
import com.yizhuan.erban.databinding.DialogRoomPkReceivedBinding
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
import com.yizhuan.xchat_android_core.room.anotherroompk.RoomPKModel
import com.yizhuan.xchat_android_core.utils.ifNotNullOrEmpty
import com.yizhuan.xchat_android_core.utils.toast
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import java.util.concurrent.TimeUnit
class RoomPkReceivedDialog : BaseDialog<DialogRoomPkReceivedBinding>() {
companion object {
@JvmStatic
fun newInstance(pkBean: RoomPkBean): RoomPkReceivedDialog {
val args = Bundle()
args.putSerializable("RoomPkBean", pkBean)
val fragment = RoomPkReceivedDialog()
fragment.arguments = args
return fragment
}
}
private val pkBean: RoomPkBean by lazy { requireArguments().getSerializable("RoomPkBean") as RoomPkBean }
private var disposable: Disposable? =null
@SuppressLint("CheckResult")
override fun init() {
binding.tvNick.text = pkBean.inviteRoomTitle
binding.tvTime.text = "${pkBean.pkDuration}分钟"
pkBean.pkDesc.ifNotNullOrEmpty {
binding.tvDescTitle.isVisible = true
binding.tvDesc.isVisible = true
binding.tvDesc.text = it
}
disposable = Observable.intervalRange(0, 10, 0, 1, TimeUnit.SECONDS)
.compose(bindToLifecycle())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete { dismissAllowingStateLoss() }
.subscribe {
binding.tvCloseTime.text = "${10 - it}"
}
binding.tvReceived.setOnClickListener {
commit(true)
}
binding.tvRefuse.setOnClickListener {
commit(false)
}
}
@SuppressLint("CheckResult")
private fun commit(accept: Boolean) {
disposable?.dispose()
RoomPKModel.acceptRoomPK(accept, AvRoomDataManager.get().roomUid, pkBean.roundId)
.compose(bindToLifecycle())
.subscribe({
"接受PK邀请成功".toast()
dismissAllowingStateLoss()
}, {
it.message.toast()
})
}
}

View File

@@ -28,6 +28,7 @@ import com.yizhuan.xchat_android_core.bean.RoomMicInfo;
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean;
import com.yizhuan.xchat_android_core.manager.AudioEngineManager;
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
import com.yizhuan.xchat_android_core.manager.EngineType;
@@ -40,6 +41,7 @@ import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterInfo;
import com.yizhuan.xchat_android_core.monsterhunting.model.MonsterHuntingModel;
import com.yizhuan.xchat_android_core.patriarch.exception.PmRoomLimitException;
import com.yizhuan.xchat_android_core.public_chat_hall.manager.PublicChatHallDataManager;
import com.yizhuan.xchat_android_core.room.anotherroompk.RoomPKModel;
import com.yizhuan.xchat_android_core.room.bean.RoomAudioSdkType;
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg;
@@ -159,10 +161,19 @@ public class AvRoomPresenter extends BaseMvpPresenter<IAvRoomView> {
fromType == AVRoomActivity.FROM_TYPE_GAME_RECOMMEND ? 1 : 0
, fromUid)
.subscribe((stringServiceResult) -> EventBus.getDefault().post(new AudioPartyOpenEvent()));
initAnotherPKData();
}, this::dealEnterRoomError);
}
@SuppressLint("CheckResult")
private void initAnotherPKData(){
if (AvRoomDataManager.get().isOpenAnotherPKMode()){
RoomPKModel.INSTANCE.getRoomPKData(AvRoomDataManager.get().getRoomUid())
.compose(bindToLifecycle())
.subscribe(roomPkBean -> AvRoomDataManager.get().roomPkLiveData.setValue(roomPkBean));
}
}
private void dealEnterRoomError(Throwable throwable) {
throwable.printStackTrace();
String roomUid = AvRoomDataManager.get().mCurrentRoomInfo != null ?

View File

@@ -31,6 +31,12 @@ public class PKProgressBar extends ProgressBar {
mHeight = h;
}
public void setThumbRes(int id){
thumbBitmap = BitmapFactory.decodeResource(getContext().getResources(), id);
thumbWidth = thumbBitmap.getWidth();
thumbHeight = thumbBitmap.getHeight();
}
@Override
protected synchronized void onDraw(Canvas canvas) {
super.onDraw(canvas);

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 定义轨道的背景 -->
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="#FF45C0FF" />
<corners android:radius="10dp" />
</shape>
</item>
<!-- 定义轨道上已完成部分的样式 -->
<item android:id="@android:id/progress">
<clip>
<shape android:shape="rectangle">
<solid android:color="#FFFF4D73" />
<corners android:radius="10dp" />
</shape>
</clip>
</item>
</layer-list>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="#FFFF5FC1"
android:startColor="#FFFA81FF"
android:type="linear"
android:useLevel="true" />
<corners android:radius="10dp" />
</shape>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="#FFFF9813"
android:startColor="#FFFFB22B"
android:type="linear"
android:useLevel="true" />
<corners android:radius="10dp" />
</shape>

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="280.5dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/bg_room_pk_received_dialog"
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:text="PK邀请"
android:textColor="@color/text_title_white"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_close_time"
android:layout_width="32dp"
android:layout_height="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_room_pk_received_time"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="#fffff600"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="@id/tv_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_title"
tools:text="09" />
<TextView
android:id="@+id/tv_nick_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:text="邀请方"
android:textColor="#ffffffff"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<TextView
android:id="@+id/tv_nick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:textColor="#ffe8e035"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/tv_nick_title"
app:layout_constraintStart_toEndOf="@id/tv_nick_title"
app:layout_constraintTop_toTopOf="@id/tv_nick_title"
tools:text="邀请方的名字名字" />
<TextView
android:id="@+id/tv_time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:text="PK时长"
android:textColor="#ffffffff"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_nick_title" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:textColor="#ffe8e035"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/tv_time_title"
app:layout_constraintStart_toEndOf="@id/tv_time_title"
app:layout_constraintTop_toTopOf="@id/tv_time_title"
tools:text="邀请方的名字名字" />
<TextView
android:id="@+id/tv_desc_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:text="PK玩法"
android:textColor="#ffffffff"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_time_title" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:textColor="#ffe8e035"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/tv_desc_title"
app:layout_constraintStart_toEndOf="@id/tv_desc_title"
app:layout_constraintTop_toTopOf="@id/tv_desc_title"
tools:text="邀请方的名字名字" />
<TextView
android:id="@+id/tv_refuse"
android:layout_width="110dp"
android:layout_height="35dp"
android:layout_marginStart="16dp"
android:layout_marginTop="25dp"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_common_cancel"
android:gravity="center"
android:includeFontPadding="false"
android:text="拒绝"
android:textColor="#ff4c5af1"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_desc_title" />
<TextView
android:id="@+id/tv_received"
android:layout_width="110dp"
android:layout_height="35dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_common_confirm"
android:gravity="center"
android:includeFontPadding="false"
android:text="接受"
android:textColor="#ffffffff"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_refuse" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@@ -0,0 +1,242 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="339dp"
android:layout_height="233dp"
android:background="@drawable/bg_room_pk_board"
android:orientation="horizontal"
tools:contentDescription="PK记分板">
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:includeFontPadding="false"
android:text="01:20:10"
android:textColor="#fffff600"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.71"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:src="@drawable/ic_room_pk_board_help"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.45"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_room_name_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="40dp"
android:textColor="@color/text_title_white"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="厅的名字七个字" />
<TextView
android:id="@+id/tv_room_name_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginEnd="12dp"
android:textColor="@color/text_title_white"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="厅的名字七个字" />
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar_left"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginStart="30dp"
android:layout_marginTop="10dp"
android:src="@drawable/default_avatar"
app:cborder_color="#FFFF4D73"
app:cborder_width="1dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_room_name_left" />
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar_right"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="30dp"
android:src="@drawable/default_avatar"
app:cborder_color="#FF45C0FF"
app:cborder_width="1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_room_name_right" />
<TextView
android:id="@+id/tv_send_gift"
android:layout_width="50dp"
android:layout_height="18dp"
android:layout_marginStart="8dp"
android:background="@drawable/bg_room_pk_send_gift"
android:gravity="center"
android:includeFontPadding="false"
android:text="助攻"
android:textColor="#ffffffff"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@id/iv_avatar_left"
app:layout_constraintTop_toTopOf="@id/iv_avatar_left" />
<TextView
android:id="@+id/tv_go_another_room"
android:layout_width="50dp"
android:layout_height="18dp"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_room_pk_go_another_room"
android:gravity="center"
android:includeFontPadding="false"
android:text="去围观"
android:textColor="#ffffffff"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@id/iv_avatar_right"
app:layout_constraintTop_toTopOf="@id/iv_avatar_right" />
<com.yizhuan.erban.avroom.widget.PKProgressBar
android:id="@+id/pb_score"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="26dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:max="100"
android:paddingTop="7dp"
android:paddingBottom="7dp"
android:progress="50"
android:progressDrawable="@drawable/bg_room_pk_board_pb"
app:layout_constraintBottom_toBottomOf="@id/iv_avatar_left"
app:layout_constraintEnd_toStartOf="@id/iv_avatar_right"
app:layout_constraintStart_toEndOf="@id/iv_avatar_left" />
<TextView
android:id="@+id/tv_score_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="sans-serif"
android:includeFontPadding="false"
android:textColor="@color/white"
android:textSize="9sp"
app:layout_constraintBottom_toBottomOf="@id/pb_score"
app:layout_constraintStart_toStartOf="@id/pb_score"
app:layout_constraintTop_toTopOf="@id/pb_score"
tools:text="123456" />
<TextView
android:id="@+id/tv_score_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:fontFamily="sans-serif"
android:includeFontPadding="false"
android:textColor="@color/white"
android:textSize="9sp"
app:layout_constraintBottom_toBottomOf="@id/pb_score"
app:layout_constraintEnd_toEndOf="@id/pb_score"
app:layout_constraintTop_toTopOf="@id/pb_score"
tools:text="123456" />
<ImageView
android:id="@+id/iv_details"
android:layout_width="30dp"
android:layout_height="20dp"
android:scaleType="center"
android:src="@drawable/ic_room_pk_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/pb_score" />
<TextView
android:id="@+id/tv_contribute_title"
android:layout_width="53dp"
android:layout_height="22dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_room_pk_contribute_text"
android:gravity="center"
android:includeFontPadding="false"
android:text="神豪"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_details" />
<TextView
android:id="@+id/tv_charm_title"
android:layout_width="53dp"
android:layout_height="22dp"
android:layout_marginTop="24dp"
android:background="@drawable/bg_room_pk_charm_text"
android:gravity="center"
android:includeFontPadding="false"
android:text="魅力"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_contribute_title" />
<com.yizhuan.erban.avroom.anotherroompk.RoomPKRankListView
android:id="@+id/view_rank_list_contribute_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/tv_contribute_title"
app:layout_constraintEnd_toStartOf="@id/tv_contribute_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_contribute_title" />
<com.yizhuan.erban.avroom.anotherroompk.RoomPKRankListView
android:id="@+id/view_rank_list_charm_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/tv_charm_title"
app:layout_constraintEnd_toStartOf="@id/tv_charm_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_charm_title" />
<com.yizhuan.erban.avroom.anotherroompk.RoomPKRankListView
android:id="@+id/view_rank_list_contribute_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/tv_contribute_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_contribute_title"
app:layout_constraintTop_toTopOf="@id/tv_contribute_title" />
<com.yizhuan.erban.avroom.anotherroompk.RoomPKRankListView
android:id="@+id/view_rank_list_charm_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/tv_charm_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_charm_title"
app:layout_constraintTop_toTopOf="@id/tv_charm_title" />
<androidx.constraintlayout.widget.Group
android:id="@+id/group_rank"
app:constraint_referenced_ids="view_rank_list_charm_right,view_rank_list_contribute_right,view_rank_list_charm_left,view_rank_list_contribute_left,tv_charm_title,tv_contribute_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="244dp"
android:layout_height="177dp"
android:background="@drawable/bg_room_pk_help"
android:orientation="horizontal"
tools:contentDescription="PK记分板">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="10dp"
android:lineSpacingExtra="3dp"
android:text="@string/room_pk_help"
android:textColor="@color/text_title_white"
android:textSize="12sp" />
</FrameLayout>

View File

@@ -0,0 +1,112 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:contentDescription="PK记分板">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar_1"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="bottom"
android:layout_marginBottom="2dp"
android:src="@drawable/default_avatar" />
<View
android:id="@+id/view_bg_1"
android:layout_width="32dp"
android:layout_height="38dp"
android:layout_gravity="bottom"
android:layout_marginBottom="2dp"
android:background="@drawable/bg_room_pk_rank_contribute1" />
<TextView
android:id="@+id/tv_value_1"
android:layout_width="32dp"
android:layout_height="10dp"
android:layout_gravity="bottom"
android:background="@drawable/bg_room_pk_contribute"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/text_title_white"
android:textSize="9sp"
tools:text="11w" />
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="10dp">
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar_2"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginBottom="2dp"
android:src="@drawable/default_avatar" />
<View
android:id="@+id/view_bg_2"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginBottom="2dp"
android:background="@drawable/bg_room_pk_rank_contribute2" />
<TextView
android:id="@+id/tv_value_2"
android:layout_width="32dp"
android:layout_height="10dp"
android:layout_gravity="bottom"
android:background="@drawable/bg_room_pk_contribute"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/text_title_white"
android:textSize="9sp"
tools:text="11w" />
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="10dp">
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar_3"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginBottom="2dp"
android:src="@drawable/default_avatar" />
<View
android:id="@+id/view_bg_3"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginBottom="2dp"
android:background="@drawable/bg_room_pk_rank_contribute2" />
<TextView
android:id="@+id/tv_value_3"
android:layout_width="32dp"
android:layout_height="10dp"
android:layout_gravity="bottom"
android:background="@drawable/bg_room_pk_contribute"
android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/text_title_white"
android:textSize="9sp"
tools:text="11w" />
</FrameLayout>
</LinearLayout>

View File

@@ -904,4 +904,5 @@
<string name="about_app">关于&app_name;</string>
<string name="authorization_text">并授权&app_name;获取本机号码</string>
<string name="text_dating_vip_rule">1.每轮相亲在“嘉宾交流”阶段累积送礼满999钻石且送礼价值最高的用户自动登上VIP席位\n\n 2.若出现多个满足上VIP席位要求的用户VIP席位最终由送礼价值最高的用户获得若送礼价值相同以最先达到该值的用户为准\n\n 3.VIP席位的用户可选择是否下麦其他用户不可因此代替坐上席位 \n\n 4.用户只能在“嘉宾交流”阶段抢夺VIP席位“嘉宾交流”阶段后直到结束本轮前即使送出超过之前VIP总礼物价值也不能换人\n\n 5.每轮相亲结束后VIP席位清空下一轮重新开始抢位。</string>
<string name="room_pk_help">1按收到的礼物价值积分1钻石=1分礼物值高的一方获胜。\n 2PK结束后若比分差距≥1314或双方分数总值≥15000平局除外将在与获胜方相同类型的房间公示PK结果若比分差距≥5200或双方分数总值≥30000平局除外将在全服所有房间公示PK结果。</string>
</resources>

View File

@@ -441,6 +441,13 @@
android:visibility="gone"
tools:contentDescription="PK记分板" />
<com.yizhuan.erban.avroom.anotherroompk.RoomPKBoardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/micro_view"
android:layout_centerHorizontal="true"
android:visibility="@{(roomInfo.roomModeType==7) ? View.VISIBLE : View.GONE}" />
<RelativeLayout
android:id="@+id/input_layout"
android:layout_width="match_parent"

View File

@@ -89,6 +89,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomGiftValueAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomInfoAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPKAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomTipAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RouterType;
import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgAttachment;
@@ -240,6 +241,7 @@ import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUS
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_ROOM_NOTIFY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_QUEUING_MIC;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ROOM_PK;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA;
@@ -270,6 +272,9 @@ import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUS
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_QUEUING_MIC_NON_EMPTY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_PK_ACCEPT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_PK_INVITE;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_PK_UPDATA;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_MONSTER_HUNTING;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_ADD_BLACK;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_KICK_ROOM;
@@ -1330,6 +1335,22 @@ public final class IMNetEaseManager {
if (second == CUSTOM_MSG_SUB_DATING_Al_NOTIFY) {
noticeRoomEvent(msg, RoomEvent.DATING_ALL_NOTIFY);
}
break;
case CUSTOM_MSG_ROOM_PK:
RoomPKAttachment roomPKAttachment = (RoomPKAttachment) msg.getAttachment();
switch (second){
case CUSTOM_MSG_SUB_ROOM_PK_INVITE:
noticeRoomEvent(msg, RoomEvent.ROOM_PK_INVITE);
break;
case CUSTOM_MSG_SUB_ROOM_PK_ACCEPT:
noticeRoomEvent(msg, RoomEvent.ROOM_PK_ACCEPT);
AvRoomDataManager.get().roomPkLiveData.postValue(roomPKAttachment.getRoomPkBean());
break;
case CUSTOM_MSG_SUB_ROOM_PK_UPDATA:
AvRoomDataManager.get().roomPkLiveData.postValue(roomPKAttachment.getRoomPkBean());
break;
}
break;
default:
break;

View File

@@ -557,6 +557,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachment.CUSTOM_MSG_MATCH_TICKET:
attachment = new MatchTicketAttachment(second);
break;
case CustomAttachment.CUSTOM_MSG_ROOM_PK:
attachment = new RoomPKAttachment(second);
break;
default:
break;
}

View File

@@ -393,9 +393,11 @@ public class CustomAttachment implements MsgAttachment {
public static final int CUSTOM_MSG_CHAT_HINT = 75;
public static final int CUSTOM_MSG_SUB_CHAT_HINT = 751;
//私聊提示
//跨房PK
public static final int CUSTOM_MSG_ROOM_PK = 83;
public static final int CUSTOM_MSG_SUB_ROOM_PK_INVITE = 831;
public static final int CUSTOM_MSG_SUB_ROOM_PK_ACCEPT = 832;
public static final int CUSTOM_MSG_SUB_ROOM_PK_UPDATA = 834;
public CustomAttachment() {

View File

@@ -0,0 +1,31 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
public class RoomPKAttachment extends CustomAttachment {
private RoomPkBean roomPkBean;
public RoomPKAttachment(int second) {
super(CUSTOM_MSG_ROOM_PK, second);
}
public RoomPkBean getRoomPkBean() {
return roomPkBean;
}
public void setRoomPkBean(RoomPkBean roomPkBean) {
this.roomPkBean = roomPkBean;
}
@Override
protected void parseData(JSONObject data) {
roomPkBean = new Gson().fromJson(data.toJSONString(), RoomPkBean.class);
}
@Override
protected JSONObject packData() {
return null;
}
}

View File

@@ -0,0 +1,97 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
@Data
public class RoomPkBean implements Serializable {
/**
* PK时长
**/
private long pkDuration;
/**
* 邀请房间标题
**/
private String inviteRoomTitle;
/**
* 邀请房间uid
**/
private long inviteUid;
/**
* PK玩法
**/
private String pkDesc;
/**
* PK轮次Id
**/
private String roundId;
/**
* 是否初始化
*/
private boolean isInit;
/**
* 是否提前/强制结束
*/
private boolean isForce;
/**
* 倒计时开始时间点:时间戳
*/
private long endTime;
/**
* 胜利方房主uid
*/
private long winUid;
//房间总流水
private long allAmount;
//当前方房主uid
private long cUid;
//当前方房主头像
private String cAvatar;
//当前方房间名称
private String cTitle;
//当前方流水
private long cAmount;
//比例:0-100当前方进度条比率
private double cPercent;
//当前神豪榜前三
private List<RankBean> csRank;
//当前魅力榜前三
private List<RankBean> crRank;
//另一方方房主uid
private long aUid;
//另一方房主头像
private String aAvatar;
//另一方房间名称
private String aTitle;
//另一方流水
private long aAmount;
//比例:0-100另一方进度条比率
private String aPercent;
//另一方神豪榜前三
private List<RankBean> asRank;
//另一方魅力榜前三
private List<RankBean> arRank;
@Data
public static class RankBean implements Serializable{
//uid
private long uid;
//昵称
private String nick;
//头像
private String avatar;
//性别
private int gender;
//贡献值/魅力值
private String amount;
}
}

View File

@@ -9,6 +9,7 @@ import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.MutableLiveData;
import com.netease.nimlib.sdk.NIMChatRoomSDK;
import com.netease.nimlib.sdk.RequestCallback;
@@ -23,6 +24,7 @@ import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
import com.netease.nimlib.sdk.msg.constant.NotificationType;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean;
import com.yizhuan.xchat_android_core.room.bean.BoxSwitchVo;
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
import com.yizhuan.xchat_android_core.room.bean.SimplePartyRoomInfo;
@@ -178,6 +180,8 @@ public final class AvRoomDataManager {
public boolean roomNoDestory;
public List<String> phrases = new ArrayList<>(Arrays.asList("萌新求关注!", "你们在聊什么呀?", "这个怎么玩呀?", "我要上麦"));
public final MutableLiveData<RoomPkBean> roomPkLiveData = new MutableLiveData<>();
private static final class Helper {
private static final AvRoomDataManager INSTANCE = new AvRoomDataManager();
@@ -474,6 +478,11 @@ public final class AvRoomDataManager {
return mCurrentRoomInfo != null && mCurrentRoomInfo.getRoomModeType() == RoomModeType.OPEN_PK_MODE;
}
public boolean isOpenAnotherPKMode() {
return mCurrentRoomInfo != null && mCurrentRoomInfo.getRoomModeType() == RoomModeType.OPEN_ANOTHER_PK_MODE;
}
/**
* 是否是房间管理员
*

View File

@@ -207,8 +207,13 @@ public class RoomEvent {
public static final int BOX_NOTIFY_SVGA = 69;
public static final int DATING_PUBLISH_RESULT = 70;
public static final int DATING_ALL_NOTIFY = 71;
public static final int ROOM_PK_INVITE = 72;
public static final int ROOM_PK_ACCEPT = 73;
private int event = NONE;
private int micPosition = Integer.MIN_VALUE;
private int posState = -1;

View File

@@ -1,6 +1,7 @@
package com.yizhuan.xchat_android_core.room.anotherroompk
import com.yizhuan.xchat_android_core.bean.response.ServiceResult
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean
import com.yizhuan.xchat_android_core.utils.net.RxHelper
import com.yizhuan.xchat_android_library.net.rxnet.RxNet
import io.reactivex.Single
@@ -49,7 +50,7 @@ object RoomPKModel {
fun acceptRoomPK(
isAccept: Boolean,
roomUid: Long,
roundId: Long
roundId: String
): Single<String> {
return api.acceptRoomPK(isAccept, roomUid, roundId)
.compose(RxHelper.handleSchAndExce())
@@ -75,6 +76,21 @@ object RoomPKModel {
.compose(RxHelper.handleBeanData())
}
/**
* 跨房pk/牌照房搜索
*
* @param roomUid roomUid
*
* @return
*/
fun getRoomPKData(
roomUid: Long
): Single<RoomPkBean> {
return api.getRoomPKData(roomUid)
.compose(RxHelper.handleSchAndExce())
.compose(RxHelper.handleBeanData())
}
private interface Api {
/**
* 发起挑战
@@ -97,11 +113,11 @@ object RoomPKModel {
* @return
*/
@FormUrlEncoded
@POST("/crossroompkround/initiateChallenge")
@POST("/crossroompkround/replyChallenge")
fun acceptRoomPK(
@Field("isAccept") isAccept: Boolean,
@Field("roomUid") roomUid: Long,
@Field("roundId") roundId: Long
@Field("roundId") roundId: String
): Single<ServiceResult<String>>
/**
@@ -117,6 +133,18 @@ object RoomPKModel {
@Query("pageSize") pageSize: Int
): Single<ServiceResult<List<SimpleRoomInfo>>>
/**
*
* 获取PK数据
*
* @return
*/
@FormUrlEncoded
@POST("/crossroompkround/getCrossPkData")
fun getRoomPKData(
@Field("roomUid") roomUid: Long?
): Single<ServiceResult<RoomPkBean>>
}

View File

@@ -9,4 +9,5 @@ public interface RoomModeType {
int CLOSE_MICRO_MODE = 2; //关闭排麦模式
int OPEN_PK_MODE = 3;//开启PK模式
int OPEN_DATING_MODE = 5;//开启相亲模式
int OPEN_ANOTHER_PK_MODE = 7;//开启跨房PK模式
}

View File

@@ -525,10 +525,10 @@ public class StatisticsProtocol {
EVENT_HOME_INTO_FOLLOW_ROOM_CLICK("home_intofollowroom"),//首页_进入收藏房间
EVENT_HOME_INTO_CHAT_ROOM_CLICK("home_intochatroom"),//首页_进入聊天交友房间
EVENT_HOME_INTO_JYKL_ROOM_CLICK("JYKL_intoroom "),//点击交友扩列项进入房间
EVENT_HOME_INTO_TJFJ_ROOM_CLICK("TJFJ_intoroom "),//点击推荐房间进入房间
EVENT_HOME_INTO_LTJY_ROOM_CLICK("LTJY_intoroom "),//点击聊天交友项进入房间
EVENT_HOME_INTO_DBRUK_CLICK("DBRUK_intoroom "),//点击顶部我的房间/关注进入房间
EVENT_HOME_INTO_JYKL_ROOM_CLICK("JYKL_intoroom"),//点击交友扩列项进入房间
EVENT_HOME_INTO_TJFJ_ROOM_CLICK("TJFJ_intoroom"),//点击推荐房间进入房间
EVENT_HOME_INTO_LTJY_ROOM_CLICK("LTJY_intoroom"),//点击聊天交友项进入房间
EVENT_HOME_INTO_DBRUK_CLICK("DBRUK_intoroom"),//点击顶部我的房间/关注进入房间
EVENT_MORE_ROOM_INTO_ROOM_CLICK("moreroom_intoroom"),//更多房间页_进入房间
EVENT_ME_INTO_MY_ROOM_CLICK("me_intomyroom"),//我页_进入我的房间