签约 1
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
package com.xscm.moduleutil.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
class SignInfo : Serializable {
|
||||||
|
/* sign_id
|
||||||
|
// 0 未开始 1进行中
|
||||||
|
sign_status;
|
||||||
|
// 签约天数
|
||||||
|
sign_day;
|
||||||
|
// 当前身价
|
||||||
|
current_body_value;
|
||||||
|
// 倒计时 时间戳
|
||||||
|
end_time;*/
|
||||||
|
|
||||||
|
var sign_id: Int = 0
|
||||||
|
var sign_status: Int = 0
|
||||||
|
var sign_day: Int = 0
|
||||||
|
var current_body_value: Int = 0
|
||||||
|
var end_time: Long = 0
|
||||||
|
}
|
||||||
@@ -75,7 +75,7 @@ public class RoomBean implements Serializable {
|
|||||||
private String room_name;//房间名称
|
private String room_name;//房间名称
|
||||||
private String room_cover;//房间封面
|
private String room_cover;//房间封面
|
||||||
private String room_intro;//房间公告
|
private String room_intro;//房间公告
|
||||||
private String type_id;//房间类型 1:点唱(pk) 2:拍卖(真爱拍小黑屋) 3/4:交友 6:小黑屋 7:互娱 8:交友
|
private String type_id;//房间类型 1:点唱(pk) 2:拍卖(真爱拍小黑屋) 3/4:交友 6:小黑屋 7:互娱 8:交友 10:签约
|
||||||
private String type_name;//房间类型名称
|
private String type_name;//房间类型名称
|
||||||
private String user_id;//房主id
|
private String user_id;//房主id
|
||||||
private String label_id;//类型id 2:ktv type:1/3/4/8
|
private String label_id;//类型id 2:ktv type:1/3/4/8
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.xscm.moduleutil.bean.NobilitDeatils;
|
import com.xscm.moduleutil.bean.NobilitDeatils;
|
||||||
|
import com.xscm.moduleutil.bean.SignInfo;
|
||||||
import com.xscm.moduleutil.bean.SingerInfo;
|
import com.xscm.moduleutil.bean.SingerInfo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -37,7 +38,7 @@ public class RoomInfoResp implements Serializable {
|
|||||||
private NobilitDeatils.NobilityInfo nobility_info;
|
private NobilitDeatils.NobilityInfo nobility_info;
|
||||||
|
|
||||||
private SingerInfo singer_info;
|
private SingerInfo singer_info;
|
||||||
|
private SignInfo sign_info;
|
||||||
|
|
||||||
//弹出麦位操作弹出
|
//弹出麦位操作弹出
|
||||||
public boolean isWheatManager() {
|
public boolean isWheatManager() {
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
|||||||
|
|
||||||
private final SVGAParser parser = new SVGAParser(CommonAppContext.getInstance());
|
private final SVGAParser parser = new SVGAParser(CommonAppContext.getInstance());
|
||||||
|
|
||||||
|
public boolean isMentorShip = false;
|
||||||
|
|
||||||
public BaseWheatView(Context context) {
|
public BaseWheatView(Context context) {
|
||||||
this(context, null, 0);
|
this(context, null, 0);
|
||||||
@@ -158,6 +159,9 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void isMentorShip(boolean isMentorShip) {
|
||||||
|
this.isMentorShip = isMentorShip;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置麦位数据
|
* 设置麦位数据
|
||||||
@@ -201,52 +205,56 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
|||||||
|
|
||||||
setPitData(bean);
|
setPitData(bean);
|
||||||
|
|
||||||
//心动值
|
|
||||||
//显示心动
|
|
||||||
if ("1".equals(pitBean.getShutup())) {
|
|
||||||
mIvShutup.setVisibility(VISIBLE);
|
|
||||||
} else {
|
|
||||||
mIvShutup.setVisibility(GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
//自动调节麦位波纹
|
//自动调节麦位波纹
|
||||||
if (mIvRipple != null) {
|
if (mIvRipple != null) {
|
||||||
mIvRipple.setScaleX(1.1f);
|
mIvRipple.setScaleX(1.1f);
|
||||||
mIvRipple.setScaleY(1.1f);
|
mIvRipple.setScaleY(1.1f);
|
||||||
}
|
}
|
||||||
if (pitNumber.equals("9")) {
|
if (!isMentorShip){
|
||||||
iv_tag_type.setImageResource(R.mipmap.zc);
|
|
||||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
//心动值
|
||||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
//显示心动
|
||||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
if ("1".equals(pitBean.getShutup())) {
|
||||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
mIvShutup.setVisibility(VISIBLE);
|
||||||
mRiv.setLayoutParams(params);
|
} else {
|
||||||
|
mIvShutup.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
} else if (pitNumber.equals("10")) {
|
|
||||||
iv_tag_type.setImageResource(R.mipmap.jb);
|
if (pitNumber.equals("9")) {
|
||||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
iv_tag_type.setImageResource(R.mipmap.zc);
|
||||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||||
mRiv.setLayoutParams(params);
|
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||||
|
mRiv.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
} else if (pitNumber.equals("10")) {
|
||||||
|
iv_tag_type.setImageResource(R.mipmap.jb);
|
||||||
|
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||||
|
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||||
|
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||||
|
mRiv.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
} else if (pitNumber.equals("-1")) {
|
||||||
|
iv_tag_type.setImageResource(R.mipmap.mu_yc);
|
||||||
|
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||||
|
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
||||||
|
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
||||||
|
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
||||||
|
mRiv.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
} else if (pitNumber.equals("0")) {
|
||||||
|
iv_tag_type.setVisibility(GONE);
|
||||||
|
mIvShutup.setVisibility(VISIBLE);
|
||||||
|
} else if (pitNumber.equals("888")) {
|
||||||
|
iv_tag_type.setVisibility(GONE);
|
||||||
|
mIvShutup.setVisibility(GONE);
|
||||||
|
} else {
|
||||||
|
iv_tag_type.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
} else if (pitNumber.equals("-1")) {
|
|
||||||
iv_tag_type.setImageResource(R.mipmap.mu_yc);
|
|
||||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
|
||||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) mRiv.getLayoutParams();
|
|
||||||
params.matchConstraintPercentWidth = 0.66f; // 设置为 52%
|
|
||||||
params.width = 0; // 必须设为 0dp(MATCH_CONSTRAINT)
|
|
||||||
mRiv.setLayoutParams(params);
|
|
||||||
}
|
|
||||||
} else if (pitNumber.equals("0")) {
|
|
||||||
iv_tag_type.setVisibility(GONE);
|
|
||||||
mIvShutup.setVisibility(VISIBLE);
|
|
||||||
} else if (pitNumber.equals("888")) {
|
|
||||||
iv_tag_type.setVisibility(GONE);
|
|
||||||
mIvShutup.setVisibility(GONE);
|
|
||||||
} else {
|
|
||||||
iv_tag_type.setVisibility(GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AgoraManager.getInstance().addSoundLevelListener(new SoundLevelUpdateListener() {
|
AgoraManager.getInstance().addSoundLevelListener(new SoundLevelUpdateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onRemoteSoundLevelUpdate(String userId, int soundLevel) {
|
public void onRemoteSoundLevelUpdate(String userId, int soundLevel) {
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
|||||||
for ((idx, view) in viewList.withIndex()) {
|
for ((idx, view) in viewList.withIndex()) {
|
||||||
if (mRoomInfo?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
|
if (mRoomInfo?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
|
||||||
view.setRoomWheatNumber(indexList[idx])
|
view.setRoomWheatNumber(indexList[idx])
|
||||||
|
if (idx == 0) {
|
||||||
|
view.setHostTv(mBinding.tvHostName)
|
||||||
|
}
|
||||||
|
view.isMentorShip(true)
|
||||||
view.setData(mRoomInfo?.room_info?.pit_list!![indexList[idx].toInt() - 1])
|
view.setData(mRoomInfo?.room_info?.pit_list!![indexList[idx].toInt() - 1])
|
||||||
view.setOnClickListener { v ->
|
view.setOnClickListener { v ->
|
||||||
if (ClickUtils.isFastDoubleClick(v)) {
|
if (ClickUtils.isFastDoubleClick(v)) {
|
||||||
@@ -107,7 +111,14 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
|||||||
pitBean =
|
pitBean =
|
||||||
mRoomInfo?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
mRoomInfo?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||||
|
|
||||||
showPopupMenu(view)
|
// 处理抱麦逻辑
|
||||||
|
RoomOnlineDialogFragment.show(
|
||||||
|
roomId,
|
||||||
|
pitBean?.pit_number,
|
||||||
|
mRoomInfo?.user_info,
|
||||||
|
mRoomInfo,
|
||||||
|
childFragmentManager
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ import android.content.res.TypedArray
|
|||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
import com.xscm.modulemain.R
|
import com.xscm.modulemain.R
|
||||||
import com.xscm.moduleutil.bean.room.RoomPitBean
|
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||||
import com.xscm.moduleutil.utils.ImageUtils
|
import com.xscm.moduleutil.utils.ImageUtils
|
||||||
import com.xscm.moduleutil.widget.BaseWheatView
|
import com.xscm.moduleutil.widget.BaseWheatView
|
||||||
|
|
||||||
class RoomMentorShipWheatView : BaseWheatView {
|
class RoomMentorShipWheatView : BaseWheatView {
|
||||||
private var iv_tag_type: ImageView? = null
|
|
||||||
|
|
||||||
constructor(context: Context?) : super(context)
|
constructor(context: Context?) : super(context)
|
||||||
|
|
||||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||||
@@ -24,6 +23,10 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
defStyleAttr
|
defStyleAttr
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
private var iv_tag_type: ImageView? = null
|
||||||
|
private var hostTv:TextView? = null
|
||||||
|
|
||||||
override fun initPit(context: Context, attrs: AttributeSet) {
|
override fun initPit(context: Context, attrs: AttributeSet) {
|
||||||
var typedArray: TypedArray? = null
|
var typedArray: TypedArray? = null
|
||||||
try {
|
try {
|
||||||
@@ -54,14 +57,25 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
this.pitNumber = number
|
this.pitNumber = number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setHostTv(hostTv:TextView){
|
||||||
|
this.hostTv = hostTv
|
||||||
|
}
|
||||||
|
|
||||||
public override fun setPitData(bean: RoomPitBean) {
|
public override fun setPitData(bean: RoomPitBean) {
|
||||||
pitBean = bean // 统一使用参数 bean
|
pitBean = bean // 统一使用参数 bean
|
||||||
stopAndClearAnimation() // 清理之前的动画资源
|
stopAndClearAnimation() // 清理之前的动画资源
|
||||||
|
|
||||||
if (pitBean.pit_number == "9" || pitBean.pit_number == "1") {
|
if ((pitBean.pit_number == "9" || pitBean.pit_number == "1") && bean.user_id != "0") {
|
||||||
mCharmView.visibility = VISIBLE
|
mCharmView.visibility = VISIBLE
|
||||||
|
if (pitBean.pit_number == "9") {
|
||||||
|
mTvName.visibility = GONE
|
||||||
|
hostTv?.visibility = VISIBLE
|
||||||
|
hostTv?.text = bean.nickname
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
|
mTvName.visibility = VISIBLE
|
||||||
mCharmView.visibility = INVISIBLE
|
mCharmView.visibility = INVISIBLE
|
||||||
|
hostTv?.visibility = GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isOn) {
|
if (isOn) {
|
||||||
@@ -70,8 +84,7 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
handleOffState(bean)
|
handleOffState(bean)
|
||||||
}
|
}
|
||||||
|
|
||||||
iv_tag_type!!.visibility = if (bean.isImageType) VISIBLE else GONE
|
iv_tag_type!!.visibility = GONE
|
||||||
iv_tag_type!!.setImageResource(com.xscm.moduleutil.R.mipmap.mu_yc)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSex(value: String?, format: Boolean) {
|
fun setSex(value: String?, format: Boolean) {
|
||||||
@@ -86,7 +99,6 @@ class RoomMentorShipWheatView : BaseWheatView {
|
|||||||
|
|
||||||
private fun handleOnState(bean: RoomPitBean) {
|
private fun handleOnState(bean: RoomPitBean) {
|
||||||
mIvRipple.visibility = VISIBLE
|
mIvRipple.visibility = VISIBLE
|
||||||
mTvName.visibility = VISIBLE
|
|
||||||
mTvName.text = bean.nickname
|
mTvName.text = bean.nickname
|
||||||
ImageUtils.loadHeadCC(bean.avatar, mRiv)
|
ImageUtils.loadHeadCC(bean.avatar, mRiv)
|
||||||
mCharmView.visibility = VISIBLE
|
mCharmView.visibility = VISIBLE
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
android:layout_width="@dimen/dp_36"
|
android:layout_width="@dimen/dp_36"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginStart="@dimen/dp_10"
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
app:layout_constraintDimensionRatio="1:1.4"
|
app:layout_constraintDimensionRatio="1:1.2"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/gl_top" />
|
app:layout_constraintTop_toTopOf="@id/gl_top" />
|
||||||
|
|
||||||
@@ -97,12 +97,22 @@
|
|||||||
android:id="@+id/iv_host_bg"
|
android:id="@+id/iv_host_bg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_35"
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
android:layout_marginTop="@dimen/dp_5"
|
|
||||||
android:src="@mipmap/icon_host_top_tips_bg"
|
android:src="@mipmap/icon_host_top_tips_bg"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_host_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_48"
|
||||||
|
android:textColor="#FFEFEAFF"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_mentor_ship_help"
|
android:id="@+id/iv_mentor_ship_help"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
@@ -110,11 +110,7 @@
|
|||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_1"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingVertical="@dimen/dp_2"
|
|
||||||
android:paddingLeft="@dimen/dp_5"
|
|
||||||
android:paddingRight="@dimen/dp_5"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="虚位以待"
|
android:text="虚位以待"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
@@ -134,6 +130,7 @@
|
|||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:backgroundTint="@color/transparent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|||||||
Reference in New Issue
Block a user