酒吧房 1
@@ -3714,11 +3714,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
setvisibTop(true)
|
||||
QXRoomSeatViewType.SIGNCONTRACT
|
||||
}
|
||||
|
||||
RoomType.PUB_ROOM -> {
|
||||
changeBackgroundColor(mRoomInfoResp?.room_info?.room_background)
|
||||
setvisibTop(true)
|
||||
QXRoomSeatViewType.PUB
|
||||
}
|
||||
null -> {
|
||||
LogUtils.e("@@@", "RoomType is null")
|
||||
QXRoomSeatViewType.NONE
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (roomFragment == null) {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.xscm.modulemain.activity.room.contacts
|
||||
|
||||
import android.app.Activity
|
||||
import com.xscm.moduleutil.activity.IPresenter
|
||||
import com.xscm.moduleutil.activity.IView
|
||||
import com.xscm.moduleutil.bean.WalletBean
|
||||
|
||||
class PubContacts {
|
||||
|
||||
interface View : IView<Activity>{
|
||||
|
||||
fun signCoinList(list:List<String>)
|
||||
|
||||
fun wallet(list:List<String>,walletBean: WalletBean?)
|
||||
}
|
||||
|
||||
interface Ipre : IPresenter{
|
||||
fun applyPit(roomId:String,pitNumber:String)
|
||||
|
||||
fun signStart(roomId:String,userId:String)
|
||||
|
||||
fun signEnd(signId:String)
|
||||
|
||||
fun signDelay(signId:String,roomId:String)
|
||||
|
||||
fun signRefuse(roomId: String)
|
||||
|
||||
fun signCoinList(signId:String)
|
||||
|
||||
fun signCoin(signId:String,sign_value:String)
|
||||
|
||||
fun setMutePit(roomId:String,pitNumber:String,isMute:String)
|
||||
|
||||
fun setLockPit(roomId:String,pitNumber:String,isLock:String)
|
||||
|
||||
fun wallet(list:List<String>)
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
private RoomJukeboxFragment roomJukeboxFragment;//点唱房
|
||||
|
||||
private RoomMentorShipFragment mentorShipFragment;//签约
|
||||
private RoomPubFragment roomPubFragment;//酒吧
|
||||
public QXRoomSeatViewType qxRoomSeatViewType;
|
||||
private void setRoomSeatViewType() {
|
||||
if (mRoomInfoResp == null || mRoomInfoResp.getRoom_info() == null) {
|
||||
@@ -129,6 +130,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.JUKEBOX;
|
||||
} else if (roomType == RoomType.SIGN_CONTRACT) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.SIGNCONTRACT;
|
||||
} else if (roomType == RoomType.PUB_ROOM) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.PUB;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,6 +206,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
roomJukeboxFragment = null;
|
||||
} else if (fragment instanceof RoomMentorShipFragment) {
|
||||
mentorShipFragment = null;
|
||||
} else if (fragment instanceof RoomPubFragment) {
|
||||
roomPubFragment = null;
|
||||
}
|
||||
|
||||
// 安全 remove
|
||||
@@ -296,6 +301,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (mentorShipFragment == currentFragment && mentorShipFragment.isAdded()) {
|
||||
mentorShipFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
} else if (roomType == RoomType.PUB_ROOM) {
|
||||
if (roomPubFragment == currentFragment && roomPubFragment.isAdded()) {
|
||||
roomPubFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,6 +428,11 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
mentorShipFragment = RoomMentorShipFragment.Companion.newInstance(mRoomInfoResp);
|
||||
} else mentorShipFragment.roomTypeSwitch(mRoomInfoResp);
|
||||
newFragment = mentorShipFragment;
|
||||
} else if (roomType == RoomType.PUB_ROOM) {
|
||||
if (roomPubFragment == null) {
|
||||
roomPubFragment = RoomPubFragment.Companion.newInstance(mRoomInfoResp);
|
||||
} else roomPubFragment.roomTypeSwitch(mRoomInfoResp);
|
||||
newFragment = roomPubFragment;
|
||||
}
|
||||
|
||||
if (newFragment != null) {
|
||||
@@ -775,6 +789,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
handleMentorshipEvent(messageEvent);
|
||||
}
|
||||
break;
|
||||
|
||||
case PUB:
|
||||
if (roomPubFragment == currentFragment) {
|
||||
roomPubFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
handlePubEvent(messageEvent);
|
||||
}
|
||||
break;
|
||||
case CABIN:
|
||||
break;
|
||||
default:
|
||||
@@ -782,7 +803,34 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void handlePubEvent(RoomMessageEvent messageEvent) {
|
||||
switch (messageEvent.getMsgType()) {
|
||||
case 1003:
|
||||
roomPubFragment.event1003(messageEvent);
|
||||
break;
|
||||
case 1004:
|
||||
roomPubFragment.event1004(messageEvent);
|
||||
break;
|
||||
case 1035:
|
||||
roomPubFragment.event1035(messageEvent);
|
||||
break;
|
||||
case 1039:
|
||||
roomPubFragment.event1039(messageEvent);
|
||||
break;
|
||||
case 1059:
|
||||
roomPubFragment.event1059(messageEvent);
|
||||
break;
|
||||
case 1005:
|
||||
roomPubFragment.event1005(messageEvent);
|
||||
break;
|
||||
case 1021:
|
||||
roomPubFragment.event1021(messageEvent);
|
||||
break;
|
||||
case 1058:
|
||||
roomPubFragment.event1058(messageEvent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void handleMentorshipEvent(RoomMessageEvent messageEvent) {
|
||||
switch (messageEvent.getMsgType()) {
|
||||
case 1003:
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
package com.xscm.modulemain.activity.room.fragment
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.blankj.utilcode.util.LogUtils
|
||||
import com.blankj.utilcode.util.ToastUtils
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity
|
||||
import com.xscm.modulemain.activity.room.presenter.PubPresenter
|
||||
import com.xscm.modulemain.databinding.FragmentPubRoomBinding
|
||||
import com.xscm.modulemain.dialog.RoomUserInfoFragment
|
||||
import com.xscm.modulemain.widget.RoomPubWheatView
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment
|
||||
import com.xscm.moduleutil.bean.RoomMessageEvent
|
||||
import com.xscm.moduleutil.bean.UserInfo
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp
|
||||
import com.xscm.moduleutil.bean.room.RoomUserBean
|
||||
import com.xscm.moduleutil.utils.ClickUtils
|
||||
|
||||
|
||||
class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
BaseMvpFragment<PubPresenter, FragmentPubRoomBinding>() {
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_pub_room
|
||||
}
|
||||
|
||||
override fun bindPresenter(): PubPresenter {
|
||||
return PubPresenter(ActivityUtils.getTopActivity(), null)
|
||||
}
|
||||
|
||||
// 无参构造函数
|
||||
constructor() : this(null)
|
||||
|
||||
companion object {
|
||||
|
||||
fun newInstance(roomInfoResp: RoomInfoResp): RoomPubFragment {
|
||||
return RoomPubFragment(roomInfoResp)
|
||||
}
|
||||
}
|
||||
|
||||
private var mUserInfo: RoomUserBean? = mRoomInfoResp?.user_info
|
||||
private var mRoomId: String = mRoomInfoResp?.room_info?.room_id!!
|
||||
|
||||
private var viewList: MutableList<RoomPubWheatView> = mutableListOf()
|
||||
private val indexList: MutableList<String> =
|
||||
mutableListOf("9", "10", "1", "2", "3", "4", "5", "6")
|
||||
|
||||
override fun initData() {
|
||||
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
viewList.clear()
|
||||
|
||||
viewList.add(mBinding.rpwvTopLeft)
|
||||
viewList.add(mBinding.rpwvTopRight)
|
||||
viewList.add(mBinding.rpwv1)
|
||||
viewList.add(mBinding.rpwv2)
|
||||
viewList.add(mBinding.rpwv3)
|
||||
viewList.add(mBinding.rpwv4)
|
||||
viewList.add(mBinding.rpwv5)
|
||||
viewList.add(mBinding.rpwv6)
|
||||
|
||||
|
||||
for ((idx, view) in viewList.withIndex()) {
|
||||
if (mRoomInfoResp?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
|
||||
view.setRoomWheatNumber(indexList[idx])
|
||||
val bean = mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||
view.setData(bean)
|
||||
|
||||
view.iv_custom_gift?.setOnClickListener {
|
||||
ToastUtils.showShort("礼物")
|
||||
}
|
||||
|
||||
view.ivYueT?.setOnClickListener {
|
||||
ToastUtils.showShort("约她")
|
||||
}
|
||||
|
||||
view.ivLiaoT?.setOnClickListener {
|
||||
ToastUtils.showShort("撩她")
|
||||
}
|
||||
|
||||
view.setOnClickListener { v ->
|
||||
if (ClickUtils.isFastDoubleClick(v)) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if (mUserInfo?.pit_number == 9 && (view.pitBean.user_id == "0" || view.pitBean.user_id.isEmpty())){
|
||||
val mPitBean =
|
||||
mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||
|
||||
// 处理抱麦逻辑
|
||||
(activity as RoomActivity).showUserListDialog(
|
||||
mRoomId,
|
||||
mPitBean?.pit_number,
|
||||
mRoomInfoResp?.user_info,
|
||||
mRoomInfoResp,
|
||||
childFragmentManager
|
||||
)
|
||||
} else if (mUserInfo?.pit_number == 9 && !(view.pitBean.user_id == "0" || view.pitBean.user_id.isEmpty())){
|
||||
RoomUserInfoFragment.show(
|
||||
mRoomInfoResp?.room_info?.room_id,
|
||||
view.getUserId(),
|
||||
view.pitNumber,
|
||||
getHostUser(),
|
||||
false,
|
||||
2,
|
||||
isNumberWhether(),
|
||||
childFragmentManager
|
||||
)
|
||||
}else{
|
||||
if (view.pitBean.user_id == "0" || view.pitBean.user_id.isEmpty()) {
|
||||
MvpPre!!.applyPit(mRoomInfoResp?.room_info?.room_id!!, view.pitNumber)
|
||||
}else {
|
||||
RoomUserInfoFragment.show(
|
||||
mRoomInfoResp?.room_info?.room_id,
|
||||
view.getUserId(),
|
||||
view.pitNumber,
|
||||
getHostUser(),
|
||||
false,
|
||||
2,
|
||||
isNumberWhether(),
|
||||
childFragmentManager
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun roomInfoUpdate(roomInfoResp: RoomInfoResp) {
|
||||
this.mRoomInfoResp = roomInfoResp
|
||||
mUserInfo = this.mRoomInfoResp?.user_info
|
||||
mRoomId = this.mRoomInfoResp?.room_info?.room_id!!
|
||||
}
|
||||
|
||||
fun roomTypeSwitch(mRoomInfoResp: RoomInfoResp) {
|
||||
this.mRoomInfoResp = mRoomInfoResp
|
||||
|
||||
mUserInfo = this.mRoomInfoResp?.user_info
|
||||
mRoomId = this.mRoomInfoResp?.room_info?.room_id!!
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun isNumberWhether(): Int {
|
||||
if (mRoomInfoResp?.user_info?.pit_number == 9) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
private fun getHostUser(): Int {
|
||||
LogUtils.e("getHostUser:${mRoomInfoResp?.user_info.toString()}")
|
||||
return if (mRoomInfoResp?.user_info?.is_room_owner == 1) {
|
||||
1
|
||||
} else if (mRoomInfoResp?.user_info?.is_management == 1) {
|
||||
2
|
||||
} else if (mRoomInfoResp?.user_info?.is_host == 1) {
|
||||
3
|
||||
} else {
|
||||
4
|
||||
}
|
||||
}
|
||||
|
||||
fun event1003(messageEvent: RoomMessageEvent) {
|
||||
val pitNumber = messageEvent.text.pit_number
|
||||
if (indexList.contains(pitNumber)) {
|
||||
val viewPos = indexList.indexOf(pitNumber)
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1]
|
||||
viewList[viewPos].setData(pitBean)
|
||||
}
|
||||
}
|
||||
|
||||
fun event1004(messageEvent: RoomMessageEvent) {
|
||||
val pitNumber = messageEvent.text.pit_number
|
||||
if (indexList.contains(pitNumber)) {
|
||||
val viewPos = indexList.indexOf(pitNumber)
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1]
|
||||
viewList[viewPos].setData(pitBean)
|
||||
}
|
||||
}
|
||||
|
||||
fun event1035(messageEvent: RoomMessageEvent) {
|
||||
val fromUserId = messageEvent.text.fromUserInfo.user_id
|
||||
for (i in 0 until viewList.size) {
|
||||
if (viewList[i].pitBean?.user_id == fromUserId.toString()) {
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![indexList[i].toInt() - 1]
|
||||
viewList[i].setData(pitBean)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun event1039(messageEvent: RoomMessageEvent) {
|
||||
val fromId = messageEvent.text.from_pit_number
|
||||
val toId = messageEvent.text.to_pit_number
|
||||
if (indexList.contains(fromId)) {
|
||||
val viewPos = indexList.indexOf(fromId)
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![fromId.toInt() - 1]
|
||||
viewList[viewPos].setData(pitBean)
|
||||
}
|
||||
|
||||
if (indexList.contains(toId)) {
|
||||
val viewPos = indexList.indexOf(toId)
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![toId.toInt() - 1]
|
||||
viewList[viewPos].setData(pitBean)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 清除个人魅力
|
||||
fun event1059(messageEvent: RoomMessageEvent) {
|
||||
val userId: String? = messageEvent.text.user_id
|
||||
|
||||
}
|
||||
|
||||
fun event1005(message: RoomMessageEvent) {
|
||||
// 检查是否有多个用户信息
|
||||
if (!message.text.toUserInfos.isNullOrEmpty()) {
|
||||
// 处理多个用户的情况
|
||||
for (userOnlineStatusBean in message.text.toUserInfos) {
|
||||
updateCharmForUser(userOnlineStatusBean)
|
||||
}
|
||||
} else {
|
||||
// 处理单个用户的情况
|
||||
val toUserInfo: UserInfo? = message.text.toUserInfo
|
||||
if (toUserInfo != null) {
|
||||
updateCharmForUser(toUserInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateCharmForUser(userInfo: UserInfo) {
|
||||
val userId = userInfo.user_id.toString()
|
||||
val charm = userInfo.charm
|
||||
|
||||
}
|
||||
|
||||
// TODO: 清除房间的魅力,一键全清
|
||||
fun event1021(messageEvent: RoomMessageEvent) {
|
||||
|
||||
}
|
||||
|
||||
fun event1058(messageEvent: RoomMessageEvent) {
|
||||
val type = messageEvent.text.type
|
||||
for (view in viewList) {
|
||||
if (view.userId.isNotEmpty() && view.userId.equals(messageEvent.text.user_id)) {
|
||||
view.pitBean.is_online = if (type == 1) 1 else 2
|
||||
view.setData(view.pitBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.xscm.modulemain.activity.room.presenter
|
||||
|
||||
import android.content.Context
|
||||
import com.xscm.modulemain.activity.room.contacts.MentorShipContacts
|
||||
import com.xscm.modulemain.activity.room.contacts.PubContacts
|
||||
import com.xscm.moduleutil.bean.WalletBean
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.presenter.BasePresenter
|
||||
import com.xscm.moduleutil.presenter.RewardGiftContacts
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
|
||||
class PubPresenter(context: Context, val view: PubContacts.View?) :
|
||||
BasePresenter<PubContacts.View>(view, context), PubContacts.Ipre {
|
||||
override fun applyPit(roomId: String, pitNumber: String) {
|
||||
RetrofitClient.getInstance().applyPit(roomId, pitNumber, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(s: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
override fun wallet(list:List<String>) {
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(walletBean: WalletBean) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = WeakReference(view)
|
||||
}
|
||||
MvpRef.get()?.wallet(list,walletBean)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
override fun signStart(roomId: String, userId: String) {
|
||||
RetrofitClient.getInstance().signStart(roomId, userId, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(s: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun signEnd(signId: String) {
|
||||
RetrofitClient.getInstance().signEnd(signId, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(s: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun signDelay(signId: String, roomId: String) {
|
||||
RetrofitClient.getInstance().signDelay(signId, roomId, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(s: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun signRefuse(roomId: String) {
|
||||
RetrofitClient.getInstance().signRefuse(roomId, object : BaseObserver<String?>(){
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(t: String) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun signCoinList(signId: String) {
|
||||
RetrofitClient.getInstance().signCoinList(signId, object : BaseObserver<List<String>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(list: List<String>) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = WeakReference(view)
|
||||
}
|
||||
MvpRef.get()?.signCoinList(list)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun signCoin(signId: String, sign_value: String) {
|
||||
RetrofitClient.getInstance().signCoin(signId, sign_value, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(s: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
override fun setMutePit(roomId: String, pitNumber: String, isMute: String) {
|
||||
RetrofitClient.getInstance()
|
||||
.setMutePit(roomId, pitNumber, isMute, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(string: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun setLockPit(roomId: String, pitNumber: String, isLock: String) {
|
||||
RetrofitClient.getInstance()
|
||||
.setLockPit(roomId, pitNumber, isLock, object : BaseObserver<String?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
}
|
||||
|
||||
override fun onNext(string: String) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -333,7 +333,7 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
// 再次检查视图状态
|
||||
if (uniqueId.equals(emojiImageView.getTag())) {
|
||||
try {
|
||||
Glide.with(mContext)
|
||||
Glide.with(emojiImageView)
|
||||
.load(emMessage.getText().getEmoji().getImage())
|
||||
.into(emojiImageView);
|
||||
}catch (Exception e){
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
package com.xscm.modulemain.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.media.Image
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
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 RoomPubWheatView : BaseWheatView {
|
||||
constructor(context: Context?) : super(context)
|
||||
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
|
||||
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
|
||||
private var iv_tag_type: ImageView? = null
|
||||
var iv_custom_gift: ImageView? = null
|
||||
private var hostTv: TextView? = null
|
||||
private var tv_time: TextView? = null
|
||||
private var ll_bottom: LinearLayout? = null
|
||||
|
||||
var ivYueT: ImageView? = null
|
||||
var ivLiaoT: ImageView? = null
|
||||
|
||||
override fun initPit(context: Context, attrs: AttributeSet) {
|
||||
var typedArray: TypedArray? = null
|
||||
try {
|
||||
typedArray = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
com.xscm.moduleutil.R.styleable.RoomDefaultWheatView
|
||||
)
|
||||
pitNumber =
|
||||
typedArray.getString(com.xscm.moduleutil.R.styleable.RoomDefaultWheatView_room_wheat_number)
|
||||
} finally {
|
||||
typedArray?.recycle()
|
||||
}
|
||||
|
||||
mCharmView = findViewById(R.id.charm_view)
|
||||
mIvRipple = findViewById(R.id.iv_ripple)
|
||||
mIvFrame = findViewById(R.id.iv_frame)
|
||||
mIvShutup = findViewById(R.id.iv_shutup)
|
||||
mRiv = findViewById(R.id.riv)
|
||||
iv_tag_type = findViewById(R.id.iv_tag_type)
|
||||
ll_bottom = findViewById(R.id.ll_bottom)
|
||||
iv_custom_gift = findViewById(R.id.iv_custom_gift)
|
||||
tv_time = findViewById(R.id.tv_time)
|
||||
|
||||
ivYueT = findViewById(R.id.iv_yue_t)
|
||||
ivLiaoT = findViewById(R.id.iv_liao_t)
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.layout_room_pub_wheat
|
||||
}
|
||||
|
||||
// 提供一个方法来设置这个属性,便于在代码中动态更改
|
||||
fun setRoomWheatNumber(number: String?) {
|
||||
this.pitNumber = number
|
||||
}
|
||||
|
||||
fun setHostTv(hostTv: TextView) {
|
||||
this.hostTv = hostTv
|
||||
}
|
||||
|
||||
public override fun setPitData(bean: RoomPitBean) {
|
||||
pitBean = bean // 统一使用参数 bean
|
||||
stopAndClearAnimation() // 清理之前的动画资源
|
||||
when (bean.pit_number) {
|
||||
"9" -> {
|
||||
iv_tag_type?.visibility = View.VISIBLE
|
||||
iv_tag_type?.setImageResource(com.xscm.moduleutil.R.mipmap.zc)
|
||||
tv_time?.visibility = View.GONE
|
||||
ll_bottom?.visibility = View.GONE
|
||||
iv_custom_gift?.visibility = View.GONE
|
||||
}
|
||||
|
||||
"10" -> {
|
||||
iv_tag_type?.visibility = View.VISIBLE
|
||||
iv_tag_type?.setImageResource(com.xscm.moduleutil.R.mipmap.jb)
|
||||
tv_time?.visibility = View.GONE
|
||||
ll_bottom?.visibility = View.GONE
|
||||
iv_custom_gift?.visibility = View.GONE
|
||||
}
|
||||
|
||||
else -> {
|
||||
tv_time?.visibility = View.GONE
|
||||
ll_bottom?.visibility = View.GONE
|
||||
iv_custom_gift?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
mCharmView.visibility = View.GONE
|
||||
|
||||
if (isOn) {
|
||||
handleOnState(bean)
|
||||
} else {
|
||||
handleOffState(bean)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun setSex(value: String?, format: Boolean) {
|
||||
mCharmView.setSex("", "", value, format)
|
||||
}
|
||||
|
||||
|
||||
private fun handleOnState(bean: RoomPitBean) {
|
||||
mIvRipple.visibility = VISIBLE
|
||||
mTvName.text = bean.nickname
|
||||
ImageUtils.loadHeadCC(bean.avatar, mRiv)
|
||||
|
||||
if (!bean.pit_number.equals("9") && !bean.pit_number.equals("10")) {
|
||||
tv_time?.visibility = View.VISIBLE
|
||||
ll_bottom?.visibility = View.VISIBLE
|
||||
iv_custom_gift?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(bean.dress)) {
|
||||
mIvFrame.stopAll()
|
||||
mIvFrame.visibility = INVISIBLE
|
||||
} else {
|
||||
mIvFrame.visibility = VISIBLE
|
||||
mIvFrame.setSource(bean.dress, 3)
|
||||
}
|
||||
}
|
||||
|
||||
private val pitNumberText: String
|
||||
get() {
|
||||
return "虚位以待"
|
||||
}
|
||||
|
||||
private fun handleOffState(bean: RoomPitBean) {
|
||||
mTvName.text = pitNumberText
|
||||
mRiv.visibility = VISIBLE
|
||||
mRiv.setImageResource(com.xscm.moduleutil.R.mipmap.room_ic_wheat_default)
|
||||
mIvShutup.visibility = GONE
|
||||
iv_tag_type!!.visibility = GONE
|
||||
mIvFrame.stopAll()
|
||||
mIvFrame.visibility = GONE
|
||||
mIvRipple.visibility = GONE
|
||||
}
|
||||
|
||||
private fun stopAndClearAnimation() {
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onRemoteSoundLevelUpdate(userId: String, soundLevel: Int) {
|
||||
}
|
||||
|
||||
override fun onLocalSoundLevelUpdate(volume: Int) {
|
||||
}
|
||||
|
||||
override fun userJoined(userId: Int, elapsd: Int) {
|
||||
}
|
||||
|
||||
override fun userOffline(userId: Int, reason: Int) {
|
||||
}
|
||||
|
||||
override fun pkOffSide(userId: Int) {
|
||||
}
|
||||
}
|
||||
163
MainModule/src/main/res/layout/fragment_pub_room.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data></data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/dp_10">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_set_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:src="@mipmap/icon_left_set_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_custom_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:src="@mipmap/icon_pub_custom_gift_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:src="@mipmap/icon_heart_help"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginEnd="@dimen/dp_8" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_midd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.2" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.8" />
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_top_left"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
app:layout_constraintDimensionRatio="1:1.1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_top_right"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:1.1"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_content_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.3" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_1"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_left"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_left"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_4"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_left"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_left"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_1" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_2"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_midd"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_5"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_midd"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_midd"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_2" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_3"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_right"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_right"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_content_top" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomPubWheatView
|
||||
android:id="@+id/rpwv_6"
|
||||
android:layout_width="@dimen/dp_95"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_line_right"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_line_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_3" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@mipmap/icon_pub_all_you"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rpwv_5" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
255
MainModule/src/main/res/layout/layout_room_pub_wheat.xml
Normal file
@@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/avatar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintDimensionRatio="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ctl_heat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<!-- 用户头像 -->
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6" />
|
||||
|
||||
<!-- 头像框 - 包裹头像 -->
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/iv_frame"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.7"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 离线状态 - 与头像框同样大小 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_online"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/room_ic_owner_offline"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/riv"
|
||||
app:layout_constraintTop_toTopOf="@id/riv"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 麦圈 - 在头像框上面展示 -->
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_ripple"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="-4dp"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6"
|
||||
app:loopCount="0"
|
||||
app:source="mic.svga" />
|
||||
<!-- 角色标签 - 头像下方覆盖部分头像 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_tag_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/zc"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/riv" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line_time"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/riv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1dp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_line_time"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_line_time"
|
||||
android:drawableLeft="@mipmap/icon_pub_time_bg"
|
||||
android:backgroundTint="@color/black"
|
||||
android:text="12:34"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:background="@drawable/shape_sign_15"
|
||||
android:paddingHorizontal="@dimen/dp_6"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
app:layout_constraintBottom_toTopOf="@id/riv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<!-- 麦克风状态 - 头像框右下角 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_shutup"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:src="@mipmap/room_microphone_off"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_goneMarginBottom="@dimen/dp_10"
|
||||
app:layout_goneMarginEnd="@dimen/dp_10"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
|
||||
<!-- 用户名称 - 在头像之下 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:text="虚位以待"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@id/ctl_heat"
|
||||
app:layout_constraintBottom_toTopOf="@id/ll_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:textColor="@color/color_FF333333" />
|
||||
|
||||
<!-- 心动值 - 在名称之下 -->
|
||||
<com.xscm.moduleutil.widget.WheatCharmView
|
||||
android:id="@+id/charm_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:backgroundTint="@color/transparent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:minWidth="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/gl_gift_line"
|
||||
app:layout_constraintGuide_percent="0.2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_custom_gift"
|
||||
android:paddingVertical="@dimen/dp_5"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintTop_toTopOf="@id/ctl_heat"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ctl_heat"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@mipmap/icon_pub_gift_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bottom"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_yue_t"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:src="@mipmap/icon_pub_yue_t"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_liao_t"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:src="@mipmap/icon_pub_liao_t"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
BIN
MainModule/src/main/res/mipmap-hdpi/icon_left_set_time.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_all_you.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_custom_gift_bg.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_gift_bg.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_liao_t.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_time_bg.png
Normal file
|
After Width: | Height: | Size: 376 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_top_friend_bg.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_pub_yue_t.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_left_set_time.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_all_you.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_custom_gift_bg.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_gift_bg.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_liao_t.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_time_bg.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_top_friend_bg.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_pub_yue_t.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_left_set_time.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_all_you.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 25 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_gift_bg.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_liao_t.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_time_bg.png
Normal file
|
After Width: | Height: | Size: 865 B |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_top_friend_bg.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_pub_yue_t.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |