新增 model
This commit is contained in:
@@ -98,6 +98,7 @@ import com.chwl.core.manager.RoomEvent
|
|||||||
import com.chwl.core.mentoring_relationship.event.MentoringStopCountingEvent
|
import com.chwl.core.mentoring_relationship.event.MentoringStopCountingEvent
|
||||||
import com.chwl.core.room.anotherroompk.ShowGiftDialogEvent
|
import com.chwl.core.room.anotherroompk.ShowGiftDialogEvent
|
||||||
import com.chwl.core.room.anotherroompk.ShowUserInfoDialogEvent
|
import com.chwl.core.room.anotherroompk.ShowUserInfoDialogEvent
|
||||||
|
import com.chwl.core.room.bean.RoomIcon
|
||||||
import com.chwl.core.room.bean.RoomInfo
|
import com.chwl.core.room.bean.RoomInfo
|
||||||
import com.chwl.core.room.event.RoomAtEvent
|
import com.chwl.core.room.event.RoomAtEvent
|
||||||
import com.chwl.core.room.event.RoomClearScreenEvent
|
import com.chwl.core.room.event.RoomClearScreenEvent
|
||||||
@@ -122,6 +123,7 @@ import com.chwl.library.common.util.LimitClickUtils
|
|||||||
import com.chwl.library.net.rxnet.utils.RxNetWorkUtils
|
import com.chwl.library.net.rxnet.utils.RxNetWorkUtils
|
||||||
import com.chwl.library.rxbus.RxBus
|
import com.chwl.library.rxbus.RxBus
|
||||||
import com.chwl.library.utils.*
|
import com.chwl.library.utils.*
|
||||||
|
import com.google.gson.Gson
|
||||||
import com.netease.nim.uikit.common.antispam.AntiSpamEvent
|
import com.netease.nim.uikit.common.antispam.AntiSpamEvent
|
||||||
import com.netease.nimlib.sdk.StatusCode
|
import com.netease.nimlib.sdk.StatusCode
|
||||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
||||||
@@ -793,6 +795,40 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
|||||||
override fun onClick(v: View) {
|
override fun onClick(v: View) {
|
||||||
if (mClickLimit.checkForTime(500)) return
|
if (mClickLimit.checkForTime(500)) return
|
||||||
when (v.id) {
|
when (v.id) {
|
||||||
|
R.id.iv_config_entrance -> {
|
||||||
|
val roomInfo = AvRoomDataManager.get().mCurrentRoomInfo ?: return
|
||||||
|
val configInfo = roomInfo.rightBottomIconConfig ?: return
|
||||||
|
if (configInfo.skipType == 1) {
|
||||||
|
|
||||||
|
} else if (configInfo.skipType == 2) {
|
||||||
|
val roomIcon: RoomIcon = RoomIcon(
|
||||||
|
skipContent = configInfo.skipUrl,
|
||||||
|
skipType = 3,
|
||||||
|
showType = 1,
|
||||||
|
code = "BAISHUN",
|
||||||
|
ruleValue = configInfo.reserve)
|
||||||
|
try {
|
||||||
|
val url = roomIcon.skipContent
|
||||||
|
val ruleValue = Gson().fromJson<RoomIcon.RuleValueBean>(
|
||||||
|
roomIcon.ruleValue,
|
||||||
|
RoomIcon.RuleValueBean::class.java
|
||||||
|
)
|
||||||
|
val config = Gson().fromJson<BaiShunGameConfig>(
|
||||||
|
ruleValue.RESERVE,
|
||||||
|
BaiShunGameConfig::class.java
|
||||||
|
)
|
||||||
|
if (config != null && url != null) {
|
||||||
|
config.reloadDynamicParams()
|
||||||
|
// listener?.onShowBaiShunGame(url, config)
|
||||||
|
(activity as? AVRoomActivity)?.showBaiShunGame(url, config)
|
||||||
|
} else {
|
||||||
|
SingleToastUtil.showToast(R.string.manager_trtc_trtcengineadapter_042)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
R.id.iv_game -> {
|
R.id.iv_game -> {
|
||||||
// RoomGameListDialog().show(childFragmentManager, "GAME_LIST")
|
// RoomGameListDialog().show(childFragmentManager, "GAME_LIST")
|
||||||
val dialog = RoomGameplayDialog()
|
val dialog = RoomGameplayDialog()
|
||||||
|
@@ -228,6 +228,18 @@
|
|||||||
tools:contentDescription="@string/layout_fragment_av_room_game_05"
|
tools:contentDescription="@string/layout_fragment_av_room_game_05"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_config_entrance"
|
||||||
|
android:layout_width="@dimen/dp_38"
|
||||||
|
android:layout_height="@dimen/dp_38"
|
||||||
|
android:layout_above="@id/iv_game"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="@dimen/dp_11"
|
||||||
|
android:layout_marginBottom="@dimen/dp_6"
|
||||||
|
android:onClick="@{click}"
|
||||||
|
android:src="@drawable/room_ic_game"
|
||||||
|
tools:visibility="gone"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_game"
|
android:id="@+id/iv_game"
|
||||||
android:layout_width="@dimen/dp_38"
|
android:layout_width="@dimen/dp_38"
|
||||||
|
@@ -0,0 +1,72 @@
|
|||||||
|
package com.chwl.core.room.bean;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class RightBottomIconConfig implements Parcelable, Serializable {
|
||||||
|
|
||||||
|
int skipType;
|
||||||
|
private String skipUrl;
|
||||||
|
|
||||||
|
private String icon2Url;
|
||||||
|
|
||||||
|
private String icon1Url;
|
||||||
|
|
||||||
|
private String reserve;
|
||||||
|
|
||||||
|
protected RightBottomIconConfig(Parcel in) {
|
||||||
|
skipType = in.readInt();
|
||||||
|
skipUrl = in.readString();
|
||||||
|
icon2Url = in.readString();
|
||||||
|
icon1Url = in.readString();
|
||||||
|
reserve = in.readString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSkipType() {
|
||||||
|
return skipType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon1Url() {
|
||||||
|
return icon1Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon2Url() {
|
||||||
|
return icon2Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReserve() {
|
||||||
|
return reserve;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSkipUrl() {
|
||||||
|
return skipUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
dest.writeInt(skipType);
|
||||||
|
dest.writeString(skipUrl);
|
||||||
|
dest.writeString(icon2Url);
|
||||||
|
dest.writeString(icon1Url);
|
||||||
|
dest.writeString(reserve);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<RightBottomIconConfig> CREATOR = new Creator<RightBottomIconConfig>() {
|
||||||
|
@Override
|
||||||
|
public RightBottomIconConfig createFromParcel(Parcel in) {
|
||||||
|
return new RightBottomIconConfig(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RightBottomIconConfig[] newArray(int size) {
|
||||||
|
return new RightBottomIconConfig[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@@ -160,6 +160,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
// 总流水
|
// 总流水
|
||||||
private double serialValue;
|
private double serialValue;
|
||||||
|
|
||||||
|
private RightBottomIconConfig rightBottomIconConfig;
|
||||||
|
|
||||||
protected RoomInfo(Parcel in) {
|
protected RoomInfo(Parcel in) {
|
||||||
uid = in.readLong();
|
uid = in.readLong();
|
||||||
officeUser = in.readInt();
|
officeUser = in.readInt();
|
||||||
@@ -192,6 +194,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
isOpenKTV = in.readByte() != 0;
|
isOpenKTV = in.readByte() != 0;
|
||||||
isOpenGame = in.readByte() != 0;
|
isOpenGame = in.readByte() != 0;
|
||||||
boxSwitchVo = in.readParcelable(BoxSwitchVo.class.getClassLoader());
|
boxSwitchVo = in.readParcelable(BoxSwitchVo.class.getClassLoader());
|
||||||
|
rightBottomIconConfig = in.readParcelable(RightBottomIconConfig.class.getClassLoader());
|
||||||
findLoveDrawSwitchVo = in.readParcelable(FindLoveSwitchVo.class.getClassLoader());
|
findLoveDrawSwitchVo = in.readParcelable(FindLoveSwitchVo.class.getClassLoader());
|
||||||
singingMusicName = in.readString();
|
singingMusicName = in.readString();
|
||||||
limitType = in.readString();
|
limitType = in.readString();
|
||||||
@@ -258,6 +261,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
dest.writeByte((byte) (isOpenKTV ? 1 : 0));
|
dest.writeByte((byte) (isOpenKTV ? 1 : 0));
|
||||||
dest.writeByte((byte) (isOpenGame ? 1 : 0));
|
dest.writeByte((byte) (isOpenGame ? 1 : 0));
|
||||||
dest.writeParcelable(boxSwitchVo, flags);
|
dest.writeParcelable(boxSwitchVo, flags);
|
||||||
|
dest.writeParcelable(rightBottomIconConfig, flags);
|
||||||
dest.writeParcelable(findLoveDrawSwitchVo, flags);
|
dest.writeParcelable(findLoveDrawSwitchVo, flags);
|
||||||
dest.writeString(singingMusicName);
|
dest.writeString(singingMusicName);
|
||||||
dest.writeString(limitType);
|
dest.writeString(limitType);
|
||||||
|
Reference in New Issue
Block a user