增加星级厨房飘屏
This commit is contained in:
BIN
app/src/main/assets/svga/kitchen_notify.svga
Normal file
BIN
app/src/main/assets/svga/kitchen_notify.svga
Normal file
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
package com.mango.moshen.avroom.widget;
|
||||
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_GIFT_COMPOUND;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_KITCHEN;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_RED_PACKAGE;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_BOX_ME;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_FANS_TEAM_JOIN;
|
||||
@@ -41,8 +42,10 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.mango.core.im.custom.bean.RoomKitchenAttachment;
|
||||
import com.mango.core.im.custom.bean.WishListAttachment;
|
||||
import com.mango.core.room.wishlist.WishListModel;
|
||||
import com.mango.moshen.utils.MsgBuilder;
|
||||
import com.netease.nim.uikit.business.uinfo.UserInfoHelper;
|
||||
import com.netease.nim.uikit.common.ui.span.RadiusBackgroundSpan;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
@@ -979,6 +982,8 @@ public class MessageView extends FrameLayout {
|
||||
if (second == CustomAttachment.CUSTOM_MSG_WISH_LIST_FINISH) {
|
||||
setWishListComplete(chatRoomMessage, tvContent);
|
||||
}
|
||||
} else if (first == CUSTOM_MSG_KITCHEN) {
|
||||
setKitchenMsg(chatRoomMessage, tvContent);
|
||||
} else {
|
||||
tvContent.setTextColor(Color.WHITE);
|
||||
tvContent.setText(tvContent.getResources().getText(R.string.not_support_message_tip));
|
||||
@@ -992,6 +997,17 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private void setKitchenMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
if (chatRoomMessage.getAttachment() instanceof RoomKitchenAttachment) {
|
||||
RoomKitchenAttachment attachment = (RoomKitchenAttachment) chatRoomMessage.getAttachment();
|
||||
tvContent.setText(MsgBuilder.buildKitchenMsg(attachment, roomTipNickColor).build());
|
||||
|
||||
if (MsgBuilder.setUpKitchenClick(tvContent, attachment.getSkipUrl(), attachment.getNeedLevel())) {
|
||||
tvContent.setOnClickListener(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void setGiftCompoundMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
if (chatRoomMessage.getAttachment() instanceof GiftCompoundAttachment) {
|
||||
|
@@ -52,6 +52,9 @@ import com.mango.core.super_admin.util.SuperAdminUtil
|
||||
import com.mango.core.user.UserModel
|
||||
import com.mango.core.user.bean.UserInfo
|
||||
import com.mango.core.utils.subAndReplaceDot
|
||||
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
||||
import com.mango.moshen.utils.MsgBuilder
|
||||
import com.mango.moshen.utils.UserUtils
|
||||
import com.mango.xchat_android_library.utils.ListUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.ObservableEmitter
|
||||
@@ -116,12 +119,19 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
private val messagesGiftCompound: MutableList<ChatRoomMessage> by lazy { ArrayList() }
|
||||
|
||||
private var animationRadish: Animation? = null
|
||||
private val messagesRadish: MutableList<ChatRoomMessage> by lazy { java.util.ArrayList() }
|
||||
private val messagesRadish: MutableList<ChatRoomMessage> by lazy { ArrayList() }
|
||||
private var radishDisposable: Disposable? = null
|
||||
|
||||
private val messagesRadishSVGA: MutableList<ChatRoomMessage> by lazy { java.util.ArrayList() }
|
||||
private val messagesRadishSVGA: MutableList<ChatRoomMessage> by lazy { ArrayList() }
|
||||
private var radishSVGADisposable: Disposable? = null
|
||||
|
||||
private var kitchenAnimation: Animation? = null
|
||||
private var kitchenDisposable: Disposable? = null
|
||||
private val kitchenMessages: MutableList<ChatRoomMessage> by lazy { ArrayList() }
|
||||
|
||||
private var kitchenSVGADisposable: Disposable? = null
|
||||
private val kitchenMessagesSVGA: MutableList<ChatRoomMessage> by lazy { ArrayList() }
|
||||
|
||||
private var isSvgaPlaying = false
|
||||
|
||||
private var isHideCarEffect = false
|
||||
@@ -216,6 +226,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
binding.svgaWishList.startAnimation()
|
||||
}
|
||||
}
|
||||
RoomEvent.KITCHEN_ROOM -> addKitchenNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.KITCHEN_ALL_ROOM -> addKitchenNotifyBySVGA(roomEvent.chatRoomMessage)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
@@ -577,6 +589,117 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
private fun addKitchenNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
binding.clNotify.visibility = VISIBLE
|
||||
}
|
||||
kitchenMessages.add(chatRoomMessage)
|
||||
if (kitchenDisposable == null || kitchenMessages.size == 1) {
|
||||
kitchenDisposable = Observable.interval(0, PERIOD.toLong(), TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.takeWhile { kitchenMessages.size > 0 }
|
||||
.subscribe {
|
||||
showKitchenNotify(
|
||||
kitchenMessages.removeAt(0)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showKitchenNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
val attachment = chatRoomMessage.attachment as RoomKitchenAttachment
|
||||
val textView =
|
||||
LayoutInflater.from(mContext).inflate(R.layout.layout_room_box_notify, null) as TextView
|
||||
val text = MsgBuilder.buildKitchenMsg(attachment)
|
||||
textView.text = text.build()
|
||||
MsgBuilder.setUpKitchenClick(textView, attachment.skipUrl, attachment.needLevel)
|
||||
kitchenAnimation = AnimationUtils.loadAnimation(mContext, R.anim.anim_box_notify)
|
||||
binding.flKitchenNotify.addView(textView)
|
||||
textView.startAnimation(kitchenAnimation)
|
||||
binding.flKitchenNotify.postDelayed(
|
||||
{ binding.flKitchenNotify.removeView(textView) },
|
||||
SHOW_TIME.toLong()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏 五级 SVGA背景的
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
private fun addKitchenNotifyBySVGA(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
binding.clNotify.visibility = VISIBLE
|
||||
}
|
||||
kitchenMessagesSVGA.add(chatRoomMessage)
|
||||
if (kitchenSVGADisposable == null || kitchenMessagesSVGA.size == 1) {
|
||||
kitchenSVGADisposable = Observable.interval(0, PERIOD.toLong(), TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.takeWhile { kitchenMessagesSVGA.size > 0 }
|
||||
.subscribe {
|
||||
showKitchenNotifyBySVGA(
|
||||
kitchenMessagesSVGA.removeAt(0)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showKitchenNotifyBySVGA(chatRoomMessage: ChatRoomMessage) {
|
||||
val attachment = chatRoomMessage.attachment as RoomKitchenAttachment
|
||||
val text = MsgBuilder.buildKitchenMsg(attachment)
|
||||
val svgaImageView = SVGAImageView(mContext)
|
||||
svgaImageView.loops = 1
|
||||
svgaImageView.clearsAfterStop = true
|
||||
val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
||||
svgaImageView.layoutParams = params
|
||||
svgaImageView.callback = object : SimpleSvgaCallback() {
|
||||
override fun onFinished() {
|
||||
binding.flKitchenSvgaNotify.post {
|
||||
binding.flKitchenSvgaNotify.removeView(
|
||||
svgaImageView
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
MsgBuilder.setUpKitchenClick(svgaImageView, attachment.skipUrl, attachment.needLevel)
|
||||
binding.flKitchenSvgaNotify.addView(svgaImageView)
|
||||
shareParser().decodeFromAssets(
|
||||
"svga/kitchen_notify.svga",
|
||||
object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
0,
|
||||
text.build().length,
|
||||
textPaint,
|
||||
0,
|
||||
Layout.Alignment.ALIGN_CENTER,
|
||||
1.0f,
|
||||
0.0f,
|
||||
false
|
||||
), "noble_text_tx"
|
||||
)
|
||||
val drawable = SVGADrawable(videoItem, dynamicEntity)
|
||||
svgaImageView.setImageDrawable(drawable)
|
||||
svgaImageView.stepToFrame(0, true)
|
||||
}
|
||||
|
||||
override fun onError() {}
|
||||
},
|
||||
null
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加跑马灯
|
||||
* 以及反射一些参数影响跑马灯
|
||||
|
43
app/src/main/java/com/mango/moshen/utils/MsgBuilder.kt
Normal file
43
app/src/main/java/com/mango/moshen/utils/MsgBuilder.kt
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.mango.moshen.utils
|
||||
|
||||
import android.graphics.Color
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.View
|
||||
import com.mango.core.im.custom.bean.RoomKitchenAttachment
|
||||
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
||||
|
||||
class MsgBuilder {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun buildKitchenMsg(
|
||||
attachment: RoomKitchenAttachment,
|
||||
nickColor: Int = Color.parseColor("#FFFE95")
|
||||
): SpannableBuilder {
|
||||
return SpannableBuilder()
|
||||
.append("恭喜 ", ForegroundColorSpan(Color.WHITE))
|
||||
.append(attachment.nick, ForegroundColorSpan(nickColor))
|
||||
.append("在星级厨房抽中", ForegroundColorSpan(Color.WHITE))
|
||||
.append(attachment.itemMultiple, ForegroundColorSpan(Color.parseColor("#00EAFF")))
|
||||
.append("倍奖励,获得", ForegroundColorSpan(Color.WHITE))
|
||||
.append(attachment.diamonds, ForegroundColorSpan(Color.parseColor("#00EAFF")))
|
||||
.append("钻石!", ForegroundColorSpan(Color.WHITE))
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setUpKitchenClick(view: View, skipUrl: String, needLevel: Int): Boolean {
|
||||
val expLevel = UserUtils.getExpLevel()
|
||||
if (expLevel != 0 && needLevel != 0 && expLevel >= needLevel) {
|
||||
view.setOnClickListener {
|
||||
CommonWebViewActivity.start(
|
||||
view.context,
|
||||
skipUrl
|
||||
)
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable-xhdpi/bg_kitchen_notice.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_kitchen_notice.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
@@ -70,6 +70,20 @@
|
||||
app:layout_constraintDimensionRatio="75:11"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_kitchen_notify"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:12"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_kitchen_svga_notify"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:12"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_box_notify"
|
||||
android:layout_width="match_parent"
|
||||
|
19
app/src/main/res/layout/layout_room_kitchen_notify.xml
Normal file
19
app/src/main/res/layout/layout_room_kitchen_notify.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.coorchice.library.SuperTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/bg_kitchen_notice"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="0dp"
|
||||
android:lineSpacingMultiplier="0.9"
|
||||
android:maxLines="2"
|
||||
android:paddingStart="80dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="80dp"
|
||||
android:textSize="12sp"
|
||||
tools:layout_height="wrap_content"
|
||||
tools:text="哈哈哈哈哈哈啊哈哈啊哈哈哈哈哈哈哈哈哈哈哈" />
|
@@ -1416,6 +1416,15 @@ public final class IMNetEaseManager {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CUSTOM_MSG_KITCHEN:
|
||||
if (customAttachment.getSecond() == CUSTOM_MSG_SUB_KITCHEN_ROOM) {
|
||||
noticeRoomEvent(msg, RoomEvent.KITCHEN_ROOM);
|
||||
addMessages(msg);
|
||||
} else if (customAttachment.getSecond() == CUSTOM_MSG_SUB_KITCHEN_ALL_ROOM) {
|
||||
noticeRoomEvent(msg, RoomEvent.KITCHEN_ALL_ROOM);
|
||||
addMessages(msg);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_T
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_SHARE_IN_APP;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEAD_SHIFT_OUT;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_IM_TIP;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_KITCHEN;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_KTV;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LEAVE_MODE;
|
||||
import static com.mango.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LEAVE_MODE_NOTICE;
|
||||
@@ -601,6 +602,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
|
||||
case CUSTOM_MSG_WISH_LIST:
|
||||
attachment = new WishListAttachment(first, second);
|
||||
break;
|
||||
case CUSTOM_MSG_KITCHEN:
|
||||
attachment = new RoomKitchenAttachment(first, second);
|
||||
break;
|
||||
default:
|
||||
LogUtils.e("未定义的first,请现在CustomAttachParser中解析first=" + first + " second=" + second);
|
||||
break;
|
||||
|
@@ -428,6 +428,11 @@ public class CustomAttachment implements MsgAttachment {
|
||||
// 关闭心愿礼物
|
||||
public static final int CUSTOM_MSG_WISH_LIST_CLOSE = 955;
|
||||
|
||||
public static final int CUSTOM_MSG_KITCHEN = 96; // 深海奇缘消息
|
||||
public static final int CUSTOM_MSG_SUB_KITCHEN_ROOM = 960; // 深海奇缘礼物房间飘屏通知(静态)
|
||||
public static final int CUSTOM_MSG_SUB_KITCHEN_ALL_ROOM = 961; // 深海奇缘礼物房间飘屏通知(动态)
|
||||
public static final int CUSTOM_MSG_SUB_kitchen_ALL_APP = 962; // 深海奇缘礼物全服飘屏通知
|
||||
|
||||
|
||||
/**
|
||||
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
|
||||
|
@@ -0,0 +1,130 @@
|
||||
package com.mango.core.im.custom.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||
|
||||
/**
|
||||
* Created by chenran on 2017/10/4.
|
||||
*/
|
||||
|
||||
public class RoomKitchenAttachment extends CustomAttachment {
|
||||
private long uid;
|
||||
private String nick;
|
||||
private long roomUid;
|
||||
private long itemId;
|
||||
private String itemMultiple;
|
||||
private String diamonds;
|
||||
private int bannerId;
|
||||
private String skipUrl;
|
||||
private int needLevel;
|
||||
|
||||
public RoomKitchenAttachment(int first, int second) {
|
||||
super(first, second);
|
||||
}
|
||||
|
||||
public long getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(long uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
return nick;
|
||||
}
|
||||
|
||||
public void setNick(String nick) {
|
||||
this.nick = nick;
|
||||
}
|
||||
|
||||
public long getRoomUid() {
|
||||
return roomUid;
|
||||
}
|
||||
|
||||
public void setRoomUid(long roomUid) {
|
||||
this.roomUid = roomUid;
|
||||
}
|
||||
|
||||
public long getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(long itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public String getItemMultiple() {
|
||||
return itemMultiple;
|
||||
}
|
||||
|
||||
public void setItemMultiple(String itemMultiple) {
|
||||
this.itemMultiple = itemMultiple;
|
||||
}
|
||||
|
||||
public String getDiamonds() {
|
||||
return diamonds;
|
||||
}
|
||||
|
||||
public void setDiamonds(String diamonds) {
|
||||
this.diamonds = diamonds;
|
||||
}
|
||||
|
||||
public int getBannerId() {
|
||||
return bannerId;
|
||||
}
|
||||
|
||||
public void setBannerId(int bannerId) {
|
||||
this.bannerId = bannerId;
|
||||
}
|
||||
|
||||
public String getSkipUrl() {
|
||||
return skipUrl;
|
||||
}
|
||||
|
||||
public void setSkipUrl(String skipUrl) {
|
||||
this.skipUrl = skipUrl;
|
||||
}
|
||||
|
||||
public int getNeedLevel() {
|
||||
return needLevel;
|
||||
}
|
||||
|
||||
public void setNeedLevel(int needLevel) {
|
||||
this.needLevel = needLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void parseData(JSONObject jsonObject) {
|
||||
uid = jsonObject.getLongValue("uid");
|
||||
nick = jsonObject.getString("nick");
|
||||
roomUid = jsonObject.getLongValue("roomUid");
|
||||
itemId = jsonObject.getLongValue("itemId");
|
||||
diamonds = jsonObject.getString("diamonds");
|
||||
itemMultiple = jsonObject.getString("itemMultiple");
|
||||
bannerId = jsonObject.getIntValue("bannerId");
|
||||
skipUrl = jsonObject.getString("skipUrl");
|
||||
needLevel = jsonObject.getIntValue("needLevel");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JSONObject packData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RoomKitchenAttachment{" +
|
||||
"uid=" + uid +
|
||||
", nick='" + nick + '\'' +
|
||||
", roomUid=" + roomUid +
|
||||
", itemId=" + itemId +
|
||||
", itemMultiple='" + itemMultiple + '\'' +
|
||||
", diamonds='" + diamonds + '\'' +
|
||||
", bannerId=" + bannerId +
|
||||
", skipUrl='" + skipUrl + '\'' +
|
||||
", needLevel=" + needLevel +
|
||||
'}';
|
||||
}
|
||||
}
|
@@ -251,6 +251,10 @@ public class RoomEvent {
|
||||
|
||||
public static final int WISH_LIST_EFFECT = 99;
|
||||
|
||||
public static final int KITCHEN_ROOM = 100;
|
||||
|
||||
public static final int KITCHEN_ALL_ROOM = 101;
|
||||
|
||||
private int event = NONE;
|
||||
private int micPosition = Integer.MIN_VALUE;
|
||||
private int posState = -1;
|
||||
|
@@ -29,34 +29,68 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
public static final String DATING_STATE_FLOW = "1";//嘉宾交流
|
||||
public static final String DATING_STATE_SELECT = "2";//心动选人
|
||||
public static final String DATING_STATE_PUBLISH = "3";//公布心动
|
||||
// 限制类型
|
||||
public static final String LOCK = "lock";//密码可进
|
||||
public static final String IS_FRIEND = "isFriend";//密码可进
|
||||
public static final String IS_INVITE = "isInvite";//密码可进
|
||||
public static final Creator<RoomInfo> CREATOR = new Creator<RoomInfo>() {
|
||||
@Override
|
||||
public RoomInfo createFromParcel(Parcel in) {
|
||||
return new RoomInfo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoomInfo[] newArray(int size) {
|
||||
return new RoomInfo[size];
|
||||
}
|
||||
};
|
||||
public String title;
|
||||
/**
|
||||
* 是否需要打开全服红包 true为开启 false为关闭
|
||||
*/
|
||||
public boolean serverRedEnvelopeSwitch;
|
||||
// 是否有桌球游戏
|
||||
public boolean hasDragonGame;
|
||||
public String roomPwd;
|
||||
/**
|
||||
* 主题类型id
|
||||
*/
|
||||
public int tagId;
|
||||
public String tagPict;
|
||||
/**
|
||||
* 房间在线人数 (会减去超管的人数)
|
||||
*/
|
||||
public int onlineNum;
|
||||
//是否有ktv权限的意思
|
||||
public boolean hasKTVPriv;
|
||||
//房间是否打开了ktv
|
||||
public boolean isOpenKTV;
|
||||
public boolean isOpenGame;
|
||||
public BoxSwitchVo boxSwitchVo;
|
||||
public String nick;
|
||||
public int gender;
|
||||
private long uid;
|
||||
|
||||
// private long openTime;
|
||||
/**
|
||||
* 官方账号与非官方账号
|
||||
*/
|
||||
private int officeUser;
|
||||
|
||||
private long roomId;
|
||||
|
||||
private long roomUid;
|
||||
|
||||
public String title;
|
||||
//头像
|
||||
private String avatar;
|
||||
private int type;
|
||||
|
||||
/** 房间主题 */
|
||||
/**
|
||||
* 房间主题
|
||||
*/
|
||||
private String roomDesc;
|
||||
private String backPic;
|
||||
|
||||
private List<String> speakTemplate;
|
||||
|
||||
/**
|
||||
* 房间是否开启,是否正在直播
|
||||
*/
|
||||
private boolean valid;
|
||||
|
||||
/**
|
||||
* 1:房主在房间,2 :房主不在房间
|
||||
*/
|
||||
@@ -67,97 +101,82 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
private int audioQuality;
|
||||
// true为关闭 false为开启
|
||||
private boolean isCloseScreen;
|
||||
/**
|
||||
* 是否需要打开全服红包 true为开启 false为关闭
|
||||
*/
|
||||
public boolean serverRedEnvelopeSwitch;
|
||||
|
||||
// 是否有桌球游戏
|
||||
public boolean hasDragonGame;
|
||||
|
||||
private String meetingName;
|
||||
|
||||
// private long openTime;
|
||||
|
||||
public String roomPwd;
|
||||
|
||||
private String sortName;
|
||||
|
||||
private String roomTag;
|
||||
/** 主题类型id */
|
||||
public int tagId;
|
||||
public String tagPict;
|
||||
/** 房间在线人数 (会减去超管的人数)*/
|
||||
public int onlineNum;
|
||||
/**
|
||||
* 是否是皇帝推荐的
|
||||
*/
|
||||
private byte isRecom;
|
||||
|
||||
private boolean isRoomFans;
|
||||
|
||||
private BackgroundBean background;
|
||||
//是否有ktv权限的意思
|
||||
public boolean hasKTVPriv;
|
||||
//房间是否打开了ktv
|
||||
public boolean isOpenKTV;
|
||||
|
||||
public boolean isOpenGame;
|
||||
|
||||
public BoxSwitchVo boxSwitchVo;
|
||||
|
||||
private String singingMusicName;
|
||||
// 限制类型
|
||||
public static final String LOCK = "lock";//密码可进
|
||||
public static final String IS_FRIEND = "isFriend";//密码可进
|
||||
public static final String IS_INVITE = "isInvite";//密码可进
|
||||
private String limitType;
|
||||
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* {@link RoomModeType}
|
||||
*/
|
||||
private int roomModeType;
|
||||
private int isPermitRoom; // 1:牌照房, 3:新秀房,其他:普通房
|
||||
|
||||
/**
|
||||
* 是否为房间纯净模式
|
||||
*/
|
||||
private boolean isPureMode;
|
||||
|
||||
/**
|
||||
* 是否关闭抽奖
|
||||
*/
|
||||
private boolean closeBox;
|
||||
|
||||
/**
|
||||
* 离开模式
|
||||
*/
|
||||
private boolean leaveMode;
|
||||
public String nick;
|
||||
public int gender;
|
||||
|
||||
private long worldId; // >0:语音派对房
|
||||
|
||||
private boolean showPkBeginTime;
|
||||
private long pkBeginTime;
|
||||
|
||||
/**
|
||||
* 个播匹配开始时间
|
||||
*/
|
||||
private long pkMatchStartTime;
|
||||
|
||||
/**
|
||||
* 是否有心愿礼物权限
|
||||
*/
|
||||
private boolean hasWishGiftPermit;
|
||||
|
||||
/**
|
||||
* 是否已经开启心愿礼物
|
||||
*/
|
||||
private boolean hasOpenWishGift;
|
||||
|
||||
/**
|
||||
* 是否开启礼物值,目前ktv房,cp房,都不支持
|
||||
*/
|
||||
private boolean showGiftValue;
|
||||
/**
|
||||
* 0.不隐藏; 1.全局+排行榜
|
||||
*/
|
||||
private int hideFlag;
|
||||
/**
|
||||
* 公屏操作人:0.房主或管理员;1.超管
|
||||
*/
|
||||
private int closeScreenFlag;
|
||||
private boolean redEnvelopeOpen;
|
||||
/**
|
||||
* COMMUNICATING(1, "交谈"),
|
||||
* PICK(2, "心动选人"),
|
||||
* PUBLISH(3, "公布心动"),
|
||||
* FINISH(4, "结束"),
|
||||
*/
|
||||
private String blindDateState = "";
|
||||
private long blindDateVipUid;
|
||||
private boolean canOpenBlindDate;
|
||||
/**
|
||||
* {@link RoomAudioSdkType}
|
||||
*/
|
||||
private String audioSdkType;
|
||||
private String trtcSig;
|
||||
private boolean isReselect;
|
||||
private long mgId;
|
||||
private String mgName;
|
||||
private int mgMicNum;
|
||||
private long clearScreenTime;
|
||||
|
||||
protected RoomInfo(Parcel in) {
|
||||
uid = in.readLong();
|
||||
@@ -179,8 +198,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
hasDragonGame = in.readByte() != 0;
|
||||
meetingName = in.readString();
|
||||
roomPwd = in.readString();
|
||||
roomTag = in.readString();
|
||||
sortName = in.readString();
|
||||
roomTag = in.readString();
|
||||
tagId = in.readInt();
|
||||
tagPict = in.readString();
|
||||
onlineNum = in.readInt();
|
||||
@@ -204,6 +223,9 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
worldId = in.readLong();
|
||||
showPkBeginTime = in.readByte() != 0;
|
||||
pkBeginTime = in.readLong();
|
||||
pkMatchStartTime = in.readLong();
|
||||
hasWishGiftPermit = in.readByte() != 0;
|
||||
hasOpenWishGift = in.readByte() != 0;
|
||||
showGiftValue = in.readByte() != 0;
|
||||
hideFlag = in.readInt();
|
||||
closeScreenFlag = in.readInt();
|
||||
@@ -220,6 +242,9 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
clearScreenTime = in.readLong();
|
||||
}
|
||||
|
||||
public RoomInfo() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeLong(uid);
|
||||
@@ -241,8 +266,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
dest.writeByte((byte) (hasDragonGame ? 1 : 0));
|
||||
dest.writeString(meetingName);
|
||||
dest.writeString(roomPwd);
|
||||
dest.writeString(roomTag);
|
||||
dest.writeString(sortName);
|
||||
dest.writeString(roomTag);
|
||||
dest.writeInt(tagId);
|
||||
dest.writeString(tagPict);
|
||||
dest.writeInt(onlineNum);
|
||||
@@ -266,6 +291,9 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
dest.writeLong(worldId);
|
||||
dest.writeByte((byte) (showPkBeginTime ? 1 : 0));
|
||||
dest.writeLong(pkBeginTime);
|
||||
dest.writeLong(pkMatchStartTime);
|
||||
dest.writeByte((byte) (hasWishGiftPermit ? 1 : 0));
|
||||
dest.writeByte((byte) (hasOpenWishGift ? 1 : 0));
|
||||
dest.writeByte((byte) (showGiftValue ? 1 : 0));
|
||||
dest.writeInt(hideFlag);
|
||||
dest.writeInt(closeScreenFlag);
|
||||
@@ -286,18 +314,10 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<RoomInfo> CREATOR = new Creator<RoomInfo>() {
|
||||
@Override
|
||||
public RoomInfo createFromParcel(Parcel in) {
|
||||
return new RoomInfo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoomInfo[] newArray(int size) {
|
||||
return new RoomInfo[size];
|
||||
}
|
||||
};
|
||||
// /**
|
||||
// * 房间角标
|
||||
// */
|
||||
// private String badge;
|
||||
|
||||
/**
|
||||
* 获取房间类型,目前是用于统计
|
||||
@@ -311,62 +331,18 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
return "普通房";
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否开启礼物值,目前ktv房,cp房,都不支持
|
||||
*/
|
||||
private boolean showGiftValue;
|
||||
|
||||
/**
|
||||
* 0.不隐藏; 1.全局+排行榜
|
||||
*/
|
||||
private int hideFlag;
|
||||
|
||||
/**
|
||||
* 公屏操作人:0.房主或管理员;1.超管
|
||||
*/
|
||||
private int closeScreenFlag;
|
||||
|
||||
private boolean redEnvelopeOpen;
|
||||
|
||||
/**
|
||||
* COMMUNICATING(1, "交谈"),
|
||||
* PICK(2, "心动选人"),
|
||||
* PUBLISH(3, "公布心动"),
|
||||
* FINISH(4, "结束"),
|
||||
*/
|
||||
private String blindDateState = "";
|
||||
|
||||
private long blindDateVipUid;
|
||||
|
||||
private boolean canOpenBlindDate;
|
||||
|
||||
/**
|
||||
* {@link RoomAudioSdkType}
|
||||
*/
|
||||
private String audioSdkType;
|
||||
|
||||
private String trtcSig;
|
||||
|
||||
private boolean isReselect;
|
||||
|
||||
private long mgId;
|
||||
|
||||
private String mgName;
|
||||
|
||||
private int mgMicNum;
|
||||
|
||||
private long clearScreenTime;
|
||||
// /**
|
||||
// * 房间角标
|
||||
// */
|
||||
// private String badge;
|
||||
|
||||
|
||||
public RoomInfo() {
|
||||
public static class BackgroundBean implements Parcelable, Serializable {
|
||||
public static final Creator<BackgroundBean> CREATOR = new Creator<BackgroundBean>() {
|
||||
@Override
|
||||
public BackgroundBean createFromParcel(Parcel in) {
|
||||
return new BackgroundBean(in);
|
||||
}
|
||||
|
||||
|
||||
public static class BackgroundBean implements Parcelable{
|
||||
@Override
|
||||
public BackgroundBean[] newArray(int size) {
|
||||
return new BackgroundBean[size];
|
||||
}
|
||||
};
|
||||
/**
|
||||
* id : 4
|
||||
* name : 背景名称ABC
|
||||
@@ -403,7 +379,6 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
private int status;
|
||||
private int uid;
|
||||
|
||||
|
||||
protected BackgroundBean(Parcel in) {
|
||||
id = in.readInt();
|
||||
name = in.readString();
|
||||
@@ -443,18 +418,6 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
dest.writeInt(uid);
|
||||
}
|
||||
|
||||
public static final Creator<BackgroundBean> CREATOR = new Creator<BackgroundBean>() {
|
||||
@Override
|
||||
public BackgroundBean createFromParcel(Parcel in) {
|
||||
return new BackgroundBean(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BackgroundBean[] newArray(int size) {
|
||||
return new BackgroundBean[size];
|
||||
}
|
||||
};
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
Reference in New Issue
Block a user