签约房UI
@@ -22,6 +22,11 @@ public enum QXRoomSeatViewType {
|
||||
*/
|
||||
JUKEBOX(9,"点唱麦位"),
|
||||
|
||||
/**
|
||||
* 签约
|
||||
*/
|
||||
SIGNCONTRACT(7,"签约"),
|
||||
|
||||
/**
|
||||
* 小黑屋麦位
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,8 @@ enum class RoomType(
|
||||
DATING("交友", 1,3, 4, 8), // 1、3、4、8 均对应交友
|
||||
BLACK_ROOM("小黑屋", 6),
|
||||
JUKEBOX("点唱", 9),
|
||||
MUTUAL_ENTERTAINMENT("互娱", 7);
|
||||
MUTUAL_ENTERTAINMENT("互娱", 17),
|
||||
SIGN_CONTRACT("签约", 7);
|
||||
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:src="@mipmap/room_ic_wheat_charm" />
|
||||
android:src="@mipmap/icon_heart_left_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value"
|
||||
|
||||
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_apply_for_mai.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_contract.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_gold_bg.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_heart_left_bg.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_host_top_tips_bg.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_mentor_left_bg.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_mentor_right_bg.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_mentor_ship_bg.png
Normal file
|
After Width: | Height: | Size: 282 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_show_alent.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_sign_contract.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_time.png
Normal file
|
After Width: | Height: | Size: 758 B |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_apply_for_mai.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_contract.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_gold_bg.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_heart_left_bg.png
Normal file
|
After Width: | Height: | Size: 951 B |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_host_top_tips_bg.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_mentor_left_bg.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_mentor_right_bg.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_mentor_ship_bg.png
Normal file
|
After Width: | Height: | Size: 496 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_show_alent.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_sign_contract.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_time.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_apply_for_mai.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_contract.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_gold_bg.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_heart_left_bg.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_host_top_tips_bg.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_mentor_left_bg.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_mentor_right_bg.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_mentor_ship_bg.png
Normal file
|
After Width: | Height: | Size: 998 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_show_alent.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_sign_contract.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_time.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -913,7 +913,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
override fun onSelfInfoUpdated(info: V2TIMUserFullInfo?) {}
|
||||
}
|
||||
|
||||
private fun setView(resp: RoomInfoResp?,isSwitchRoomType:Boolean = false) {
|
||||
private fun setView(resp: RoomInfoResp?, isSwitchRoomType: Boolean = false) {
|
||||
if (resp == null)
|
||||
return
|
||||
AppStateManager.getInstance().roomInfo = resp
|
||||
@@ -1048,7 +1048,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
fun getRoomInfoResp(): List<RoomPitBean>? {
|
||||
val roomPitBeans = mRoomInfoResp?.room_info?.pit_list.orEmpty().filter {
|
||||
it.user_id != null && it.user_id != "0" && it.user_id.isNotEmpty()&& it.user_id.toInt() != SpUtil.getUserId() && it.pit_number.toInt()<9
|
||||
it.user_id != null && it.user_id != "0" && it.user_id.isNotEmpty() && it.user_id.toInt() != SpUtil.getUserId() && it.pit_number.toInt() < 9
|
||||
}
|
||||
return roomPitBeans.ifEmpty { null }
|
||||
}
|
||||
@@ -1484,15 +1484,22 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove) {
|
||||
qxRedPacketManager!!.removeRedPacket(messageEvent.text.redpacket_id)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSongerNum //房间点歌数量变化
|
||||
|| msgType ==EMMessageInfo.QXRoomMessageTypeSingerRoomCurrentSongDidChanged //点歌房当前歌曲发生变化
|
||||
||msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomNextSongDidChanged) { //点歌房下一首歌曲发生变化
|
||||
|| msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomCurrentSongDidChanged //点歌房当前歌曲发生变化
|
||||
|| msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomNextSongDidChanged
|
||||
) { //点歌房下一首歌曲发生变化
|
||||
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
}else if(msgType == EMMessageInfo.QXRoomMessageTypeCPText){
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCPText) {
|
||||
LogUtils.e("CPText", messageEvent.text.rights_icon)
|
||||
if(messageEvent.text.rights_icon.isNotEmpty()){
|
||||
QXGiftPlayerManager.getInstance(this).displayCPView(messageEvent.text.fromUserInfo.avatar,messageEvent.text.toUserInfo.avatar,messageEvent.text.fromUserInfo.nickname, messageEvent.text.toUserInfo.nickname,messageEvent.text.rights_icon)
|
||||
if (messageEvent.text.rights_icon.isNotEmpty()) {
|
||||
QXGiftPlayerManager.getInstance(this).displayCPView(
|
||||
messageEvent.text.fromUserInfo.avatar,
|
||||
messageEvent.text.toUserInfo.avatar,
|
||||
messageEvent.text.fromUserInfo.nickname,
|
||||
messageEvent.text.toUserInfo.nickname,
|
||||
messageEvent.text.rights_icon
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1769,7 +1776,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.rlMore.visibility = View.GONE
|
||||
mBinding!!.rlMisc.visibility = View.GONE
|
||||
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = getPitBean(messageEvent, 1)
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
||||
getPitBean(messageEvent, 1)
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
@@ -1848,7 +1856,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
//TODO 下麦更换数据
|
||||
val labelId = mRoomInfoResp!!.room_info.label_id
|
||||
if ("1" == labelId) {
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = RoomPitBean(pitNumber)
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
||||
RoomPitBean(pitNumber)
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||
@@ -1856,12 +1865,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RoomType.MUTUAL_ENTERTAINMENT -> {
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = RoomPitBean(pitNumber)
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
|
||||
else -> {
|
||||
roomFragment!!.updateSeatViewExchangedWithPitArray(mRoomInfoResp)
|
||||
}
|
||||
@@ -2532,8 +2543,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.imVoive.setImageResource(com.xscm.moduleutil.R.mipmap.room_voice_kg)
|
||||
}
|
||||
AgoraManager.getInstance().muteSpeaker(voive)
|
||||
if(mRoomInfoResp?.pk_info != null) {
|
||||
if (!roomFragment?.singSongFragment?.pkMicIsOn!!){
|
||||
if (mRoomInfoResp?.pk_info != null) {
|
||||
if (!roomFragment?.singSongFragment?.pkMicIsOn!!) {
|
||||
AgoraManagerEx.getInstance().muteSpeaker(voive)
|
||||
}
|
||||
}
|
||||
@@ -2544,7 +2555,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mRoomInfoResp?.room_info?.is_pk!!
|
||||
)
|
||||
|
||||
LogUtils.e("pk_info","id == R.id.rl_more ${mRoomInfoResp?.room_info?.is_pk!!}")
|
||||
LogUtils.e("pk_info", "id == R.id.rl_more ${mRoomInfoResp?.room_info?.is_pk!!}")
|
||||
fragment.show(supportFragmentManager, "RoomPkDialogFragment")
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
} else if (id == R.id.rl_message) {
|
||||
@@ -3316,9 +3327,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
* @description: 初始化音频,初始的时候,当是在麦上,将用户设置为主持,在麦下,设置为观众, 默认关闭麦克风
|
||||
*/
|
||||
fun initializeAudio(isSwitchRoomType: Boolean) {
|
||||
if (isSwitchRoomType){
|
||||
if (isSwitchRoomType) {
|
||||
AgoraManager.getInstance().muteSpeaker(voive)
|
||||
}else{
|
||||
} else {
|
||||
if (mRoomUserBean!!.pit_number != 0) {
|
||||
AgoraManager.getInstance().ClientRole(true)
|
||||
AgoraManager.getInstance().muteLocalAudioStream(false)
|
||||
@@ -3767,7 +3778,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
this.mRoomInfoResp = resp
|
||||
|
||||
setView(resp,true)
|
||||
setView(resp, true)
|
||||
}
|
||||
|
||||
fun upHeight() {
|
||||
@@ -3847,6 +3858,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
QXRoomSeatViewType.JUKEBOX
|
||||
}
|
||||
|
||||
RoomType.SIGN_CONTRACT -> {
|
||||
if (mRoomInfoResp!!.room_info.room_background == null || mRoomInfoResp!!.room_info.room_background == "") {
|
||||
changeBackground(com.xscm.moduleutil.R.mipmap.jukebox_bj)
|
||||
} else {
|
||||
changeBackgroundColor(mRoomInfoResp!!.room_info.room_background)
|
||||
}
|
||||
|
||||
setvisibTop(true)
|
||||
QXRoomSeatViewType.SIGNCONTRACT
|
||||
}
|
||||
|
||||
null -> {
|
||||
LogUtils.e("@@@", "RoomType is null")
|
||||
QXRoomSeatViewType.NONE
|
||||
@@ -4400,10 +4422,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
private fun userPermissionChange(){
|
||||
if (getHostUser() < 4){
|
||||
private fun userPermissionChange() {
|
||||
if (getHostUser() < 4) {
|
||||
mBinding?.roomTop?.rl?.visibility = View.VISIBLE
|
||||
}else{
|
||||
} else {
|
||||
mBinding?.roomTop?.rl?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.modulemain.activity.room.contacts
|
||||
|
||||
import android.app.Activity
|
||||
import com.xscm.moduleutil.activity.IPresenter
|
||||
import com.xscm.moduleutil.activity.IView
|
||||
|
||||
class MentorShipContacts {
|
||||
|
||||
interface View : IView<Activity>{
|
||||
|
||||
}
|
||||
|
||||
interface Ipre : IPresenter{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,8 @@ import java.util.List;
|
||||
* @description:房间fragment
|
||||
*/
|
||||
public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBinding> implements RoomContacts.View {
|
||||
|
||||
|
||||
public static RoomFragment newInstance(RoomActivity roomActivity, RoomInfoResp resp) {
|
||||
Bundle args = new Bundle();
|
||||
RoomFragment fragment = new RoomFragment(roomActivity, resp);
|
||||
@@ -100,6 +102,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
private RoomJukeboxFragment roomJukeboxFragment;//点唱房
|
||||
|
||||
private RoomMentorShipFragment mentorShipFragment;//签约
|
||||
public QXRoomSeatViewType qxRoomSeatViewType;
|
||||
|
||||
private void setRoomSeatViewType() {
|
||||
@@ -126,6 +129,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.CABIN;
|
||||
} else if (roomType == RoomType.JUKEBOX) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.JUKEBOX;
|
||||
} else if (roomType == RoomType.SIGN_CONTRACT) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.SIGNCONTRACT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,6 +305,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (roomJukeboxFragment != null && roomJukeboxFragment.isAdded()) {
|
||||
roomJukeboxFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
}else if (roomType == RoomType.SIGN_CONTRACT) {
|
||||
if (mentorShipFragment != null && mentorShipFragment.isAdded()) {
|
||||
mentorShipFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,6 +428,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
roomJukeboxFragment = RoomJukeboxFragment.newInstance(mRoomInfoResp);
|
||||
else roomJukeboxFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
newFragment = roomJukeboxFragment;
|
||||
} else if (roomType == RoomType.SIGN_CONTRACT) {
|
||||
if(mentorShipFragment == null){
|
||||
mentorShipFragment = RoomMentorShipFragment.Companion.newInstance(mRoomInfoResp);
|
||||
}else{
|
||||
mentorShipFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
newFragment = mentorShipFragment;
|
||||
}
|
||||
|
||||
if (newFragment != null) {
|
||||
@@ -895,6 +911,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (roomJukeboxFragment != null) {
|
||||
handleJukeboxEvent(messageEvent);
|
||||
}
|
||||
case SIGNCONTRACT:
|
||||
if (mentorShipFragment != null) {
|
||||
handleMentorshipEvent(messageEvent);
|
||||
}
|
||||
|
||||
case CABIN:
|
||||
default:
|
||||
@@ -903,6 +923,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
private void handleMentorshipEvent(RoomMessageEvent messageEvent) {
|
||||
|
||||
}
|
||||
|
||||
// TODO: 2025/11/17 点唱房
|
||||
private void handleJukeboxEvent(RoomMessageEvent messageEvent) {
|
||||
switch (messageEvent.getMsgType()) {
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.xscm.modulemain.activity.room.fragment
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.contacts.MentorShipContacts
|
||||
import com.xscm.modulemain.activity.room.presenter.MentorShipPresenter
|
||||
import com.xscm.modulemain.databinding.FragmentMentorShipBinding
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp
|
||||
|
||||
/**
|
||||
* 签约房
|
||||
* 1234 5 9
|
||||
*/
|
||||
class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp) :
|
||||
BaseMvpFragment<MentorShipPresenter, FragmentMentorShipBinding>(), MentorShipContacts.View {
|
||||
|
||||
companion object {
|
||||
@Volatile
|
||||
private var INSTANCE: RoomMentorShipFragment? = null
|
||||
|
||||
fun newInstance(roomInfoResp: RoomInfoResp): RoomMentorShipFragment {
|
||||
return INSTANCE ?: synchronized(this) {
|
||||
INSTANCE ?: RoomMentorShipFragment(roomInfoResp).also { INSTANCE = it }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_mentor_ship
|
||||
}
|
||||
|
||||
override fun bindPresenter(): MentorShipPresenter {
|
||||
return MentorShipPresenter(ActivityUtils.getTopActivity(), this)
|
||||
}
|
||||
|
||||
|
||||
override fun initData() {
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
}
|
||||
|
||||
fun roomInfoUpdate(mRoomInfoResp: RoomInfoResp) {
|
||||
mRoomInfo = mRoomInfoResp
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.xscm.modulemain.activity.room.presenter
|
||||
|
||||
import android.content.Context
|
||||
import com.xscm.modulemain.activity.room.contacts.MentorShipContacts
|
||||
import com.xscm.moduleutil.presenter.BasePresenter
|
||||
|
||||
class MentorShipPresenter(context: Context, view: MentorShipContacts.View) :
|
||||
BasePresenter<MentorShipContacts.View>(view, context), MentorShipContacts.Ipre {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.xscm.modulemain.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
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(context: Context?) : BaseWheatView(context) {
|
||||
|
||||
constructor(context: Context?, attrs: AttributeSet?) : this(context) {
|
||||
initPit(context, attrs)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.layout_room_mentorship_wheat
|
||||
}
|
||||
|
||||
// 提供一个方法来设置这个属性,便于在代码中动态更改
|
||||
fun setRoomWheatNumber(number: String?) {
|
||||
this.pitNumber = number
|
||||
}
|
||||
|
||||
override fun setPitData(bean: RoomPitBean?) {
|
||||
if (bean == null) return
|
||||
|
||||
pitBean = bean // 统一使用参数 bean
|
||||
stopAndClearAnimation() // 清理之前的动画资源
|
||||
|
||||
if (isOn) {
|
||||
handleOnState(bean)
|
||||
} else {
|
||||
handleOffState(bean)
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopAndClearAnimation() {
|
||||
if (mIvRipple != null) {
|
||||
mIvRipple.stopAnimation(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun handleOnState(bean: RoomPitBean) {
|
||||
mIvRipple.visibility = VISIBLE
|
||||
mTvName.visibility = VISIBLE
|
||||
mTvName.text = bean.nickname
|
||||
ImageUtils.loadHeadCC(bean.avatar, mRiv)
|
||||
mCharmView.visibility = VISIBLE
|
||||
if (TextUtils.isEmpty(bean.dress)) {
|
||||
mIvFrame.stopAll()
|
||||
mIvFrame.visibility = INVISIBLE
|
||||
} else {
|
||||
mIvFrame.visibility = VISIBLE
|
||||
mIvFrame.setSource(bean.dress, 3)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleOffState(bean: RoomPitBean) {
|
||||
if (bean.pit_number == "9") {
|
||||
mTvName.visibility = GONE
|
||||
} else {
|
||||
mTvName.visibility = VISIBLE
|
||||
mTvName.setText(getPitNumberText())
|
||||
}
|
||||
mCharmView.visibility = GONE
|
||||
mRiv.visibility = VISIBLE
|
||||
mRiv.setImageResource(R.mipmap.jukebox_room_mask)
|
||||
mIvShutup.visibility = GONE
|
||||
mIvFrame.stopAll()
|
||||
mIvFrame.visibility = GONE
|
||||
mIvRipple.visibility = GONE
|
||||
}
|
||||
|
||||
|
||||
private fun getPitNumberText(): String {
|
||||
if ("-1" == pitNumber) return ""
|
||||
if ("9" == pitNumber) return ""
|
||||
if ("10" == pitNumber) return "老板"
|
||||
return pitNumber + "号麦"
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
265
MainModule/src/main/res/layout/fragment_mentor_ship.xml
Normal file
@@ -0,0 +1,265 @@
|
||||
<?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:paddingHorizontal="@dimen/dp_10">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_10" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_mentor_ship_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/youshebiaotihei"
|
||||
android:text="签约房"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_top" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tools:text="倒计时:00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:background="@drawable/shape_15"
|
||||
android:backgroundTint="#3ABC6D"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/dp_8"
|
||||
android:paddingVertical="@dimen/dp_1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_time"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_time"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_time"
|
||||
android:text="开始" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:background="@drawable/shape_15"
|
||||
android:backgroundTint="#33FFFFFF"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/dp_8"
|
||||
android:paddingVertical="@dimen/dp_1"
|
||||
android:text="结束"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_time"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_time"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_time" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_1"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="1:1.4.4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_top" />
|
||||
|
||||
<ImageView
|
||||
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:src="@mipmap/icon_host_top_tips_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_mentor_ship_help"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_left_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/view_left_price"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_86"
|
||||
android:background="@drawable/shape_dialog"
|
||||
android:backgroundTint="#33000000"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_apply_for_mai"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_left_price_gold_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_gold_bg"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_left_price"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_left_price"
|
||||
app:layout_constraintStart_toStartOf="@id/view_left_price"
|
||||
app:layout_constraintTop_toTopOf="@id/view_left_price"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_left_price_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_15"
|
||||
android:backgroundTint="#FF49E4A1"
|
||||
android:paddingHorizontal="@dimen/dp_8"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:text="起拍价格"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/gl_left_price"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_apply_for_mai"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_left_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="9998"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="normal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_left_price"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_left_price"
|
||||
app:layout_constraintStart_toStartOf="@id/view_left_price"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_left_price_gold_bg" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_midd"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_apply_for_mai"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_75"
|
||||
android:src="@mipmap/icon_apply_for_mai"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_left_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:src="@mipmap/icon_mentor_left_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_left"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fly_bottom"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_left_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_left_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/fly_bottom" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/fly_bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.86" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_right_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:src="@mipmap/icon_mentor_right_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_right_left"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fly_bottom"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_right_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/fly_bottom" />
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_right_midd"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fly_bottom"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_right_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_right_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/fly_bottom" />
|
||||
|
||||
<com.xscm.modulemain.widget.RoomMentorShipWheatView
|
||||
android:id="@+id/rmsw_right_right"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fly_bottom"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_right_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/rmsw_right_midd"
|
||||
app:layout_constraintTop_toTopOf="@id/fly_bottom" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
154
MainModule/src/main/res/layout/layout_room_mentorship_wheat.xml
Normal file
@@ -0,0 +1,154 @@
|
||||
<?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="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1.4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
<!-- 离线状态 - 与头像框同样大小 -->
|
||||
<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/iv_frame"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_frame"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_frame"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_frame"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 用户头像 -->
|
||||
<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="@id/gl_center"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_center"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gl_center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
app:layout_constraintGuide_percent="0.46"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<!-- 头像框 - 包裹头像 -->
|
||||
<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="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/gl_center"
|
||||
app:layout_constraintDimensionRatio="1.1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_center"
|
||||
app:layout_constraintWidth_percent="1"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 麦圈 - 在头像框上面展示 -->
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_ripple"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="@id/gl_center"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_center"
|
||||
app:layout_constraintWidth_percent="1"
|
||||
app:loopCount="0"
|
||||
app:source="mic.svga" />
|
||||
|
||||
<!-- 麦克风状态 - 头像框右下角 -->
|
||||
<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: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="麦位1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintBottom_toTopOf="@id/charm_view"
|
||||
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:minWidth="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/gl_center"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/gl_center" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||