签约 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_cover;//房间封面
|
||||
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 user_id;//房主id
|
||||
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 com.xscm.moduleutil.bean.NobilitDeatils;
|
||||
import com.xscm.moduleutil.bean.SignInfo;
|
||||
import com.xscm.moduleutil.bean.SingerInfo;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -37,7 +38,7 @@ public class RoomInfoResp implements Serializable {
|
||||
private NobilitDeatils.NobilityInfo nobility_info;
|
||||
|
||||
private SingerInfo singer_info;
|
||||
|
||||
private SignInfo sign_info;
|
||||
|
||||
//弹出麦位操作弹出
|
||||
public boolean isWheatManager() {
|
||||
|
||||
@@ -92,6 +92,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
private final SVGAParser parser = new SVGAParser(CommonAppContext.getInstance());
|
||||
|
||||
public boolean isMentorShip = false;
|
||||
|
||||
public BaseWheatView(Context context) {
|
||||
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,6 +205,13 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
setPitData(bean);
|
||||
|
||||
//自动调节麦位波纹
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.setScaleX(1.1f);
|
||||
mIvRipple.setScaleY(1.1f);
|
||||
}
|
||||
if (!isMentorShip){
|
||||
|
||||
//心动值
|
||||
//显示心动
|
||||
if ("1".equals(pitBean.getShutup())) {
|
||||
@@ -209,11 +220,6 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
mIvShutup.setVisibility(GONE);
|
||||
}
|
||||
|
||||
//自动调节麦位波纹
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.setScaleX(1.1f);
|
||||
mIvRipple.setScaleY(1.1f);
|
||||
}
|
||||
if (pitNumber.equals("9")) {
|
||||
iv_tag_type.setImageResource(R.mipmap.zc);
|
||||
if (mRiv.getLayoutParams() instanceof ConstraintLayout.LayoutParams) {
|
||||
@@ -247,6 +253,8 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
} else {
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
AgoraManager.getInstance().addSoundLevelListener(new SoundLevelUpdateListener() {
|
||||
@Override
|
||||
public void onRemoteSoundLevelUpdate(String userId, int soundLevel) {
|
||||
|
||||
@@ -73,6 +73,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
for ((idx, view) in viewList.withIndex()) {
|
||||
if (mRoomInfo?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
|
||||
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.setOnClickListener { v ->
|
||||
if (ClickUtils.isFastDoubleClick(v)) {
|
||||
@@ -107,7 +111,14 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
pitBean =
|
||||
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.util.AttributeSet
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.widget.BaseWheatView
|
||||
|
||||
class RoomMentorShipWheatView : BaseWheatView {
|
||||
private var iv_tag_type: ImageView? = null
|
||||
|
||||
constructor(context: Context?) : super(context)
|
||||
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
@@ -24,6 +23,10 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
|
||||
private var iv_tag_type: ImageView? = null
|
||||
private var hostTv:TextView? = null
|
||||
|
||||
override fun initPit(context: Context, attrs: AttributeSet) {
|
||||
var typedArray: TypedArray? = null
|
||||
try {
|
||||
@@ -54,14 +57,25 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
this.pitNumber = number
|
||||
}
|
||||
|
||||
fun setHostTv(hostTv:TextView){
|
||||
this.hostTv = hostTv
|
||||
}
|
||||
|
||||
public override fun setPitData(bean: RoomPitBean) {
|
||||
pitBean = bean // 统一使用参数 bean
|
||||
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
|
||||
if (pitBean.pit_number == "9") {
|
||||
mTvName.visibility = GONE
|
||||
hostTv?.visibility = VISIBLE
|
||||
hostTv?.text = bean.nickname
|
||||
}
|
||||
}else{
|
||||
mTvName.visibility = VISIBLE
|
||||
mCharmView.visibility = INVISIBLE
|
||||
hostTv?.visibility = GONE
|
||||
}
|
||||
|
||||
if (isOn) {
|
||||
@@ -70,8 +84,7 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
handleOffState(bean)
|
||||
}
|
||||
|
||||
iv_tag_type!!.visibility = if (bean.isImageType) VISIBLE else GONE
|
||||
iv_tag_type!!.setImageResource(com.xscm.moduleutil.R.mipmap.mu_yc)
|
||||
iv_tag_type!!.visibility = GONE
|
||||
}
|
||||
|
||||
fun setSex(value: String?, format: Boolean) {
|
||||
@@ -86,7 +99,6 @@ class RoomMentorShipWheatView : BaseWheatView {
|
||||
|
||||
private fun handleOnState(bean: RoomPitBean) {
|
||||
mIvRipple.visibility = VISIBLE
|
||||
mTvName.visibility = VISIBLE
|
||||
mTvName.text = bean.nickname
|
||||
ImageUtils.loadHeadCC(bean.avatar, mRiv)
|
||||
mCharmView.visibility = VISIBLE
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="0dp"
|
||||
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_constraintTop_toTopOf="@id/gl_top" />
|
||||
|
||||
@@ -97,12 +97,22 @@
|
||||
android:id="@+id/iv_host_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:src="@mipmap/icon_host_top_tips_bg"
|
||||
app:layout_constraintStart_toStartOf="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
|
||||
android:id="@+id/iv_mentor_ship_help"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -110,11 +110,7 @@
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:paddingRight="@dimen/dp_5"
|
||||
android:singleLine="true"
|
||||
android:text="虚位以待"
|
||||
android:textColor="@color/white"
|
||||
@@ -134,6 +130,7 @@
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:visibility="gone"
|
||||
android:backgroundTint="@color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user