新增相亲模式VIP坑位
This commit is contained in:
@@ -55,8 +55,9 @@ public abstract class BaseMicroViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
public static final String MICRO_TYPE_KTV = "ktv";
|
||||
public static final String MICRO_TYPE_NORMAL = "normal";
|
||||
public static final String MICRO_TYPE_DATING = "dating";
|
||||
public static final String MICRO_TYPE_DATING_VIP = "dating_vip";
|
||||
|
||||
private OnMicroItemClickListener onMicroItemClickListener;
|
||||
protected OnMicroItemClickListener onMicroItemClickListener;
|
||||
|
||||
protected Context context;
|
||||
|
||||
|
@@ -17,6 +17,7 @@ import com.yizhuan.xchat_android_core.Constants
|
||||
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo
|
||||
import com.yizhuan.xchat_android_core.utils.LogUtils
|
||||
|
||||
|
||||
/**
|
||||
@@ -45,9 +46,15 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return if (viewType == TYPE_BOSS) {
|
||||
DatingBossMicroViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_micro_dating_boss, parent, false))
|
||||
DatingBossMicroViewHolder(
|
||||
LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_micro_dating_boss, parent, false)
|
||||
)
|
||||
} else {
|
||||
DatingMicroViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_micro_dating, parent, false))
|
||||
DatingMicroViewHolder(
|
||||
LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_micro_dating, parent, false)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +63,8 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
override fun microType() = MICRO_TYPE_DATING
|
||||
|
||||
|
||||
private inner class DatingMicroViewHolder constructor(itemView: View) : GiftValueViewHolder(itemView) {
|
||||
open inner class DatingMicroViewHolder constructor(itemView: View) :
|
||||
GiftValueViewHolder(itemView) {
|
||||
|
||||
private val viewGenderBg: View = itemView.findViewById(R.id.view_gender_bg)
|
||||
private val tvSelectedStatus: TextView = itemView.findViewById(R.id.tv_selected_status)
|
||||
@@ -82,8 +90,9 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
if (it.isHasSelectUser) {
|
||||
tvSelectedStatus.isSelected = true
|
||||
if (roomInfo.blindDateState == RoomInfo.DATING_STATE_PUBLISH ||
|
||||
uid == it.account.toLong() ||
|
||||
AvRoomDataManager.get().isPreside(uid)) {
|
||||
uid == it.account.toLong() ||
|
||||
AvRoomDataManager.get().isPreside(uid)
|
||||
) {
|
||||
tvSelectedStatus.text = "选${it.selectMicPosition + 1}号"
|
||||
} else {
|
||||
tvSelectedStatus.text = "已选择"
|
||||
@@ -102,7 +111,9 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
} ?: run {
|
||||
tvSelectedStatus.visibility = View.GONE
|
||||
ivCap.visibility = View.GONE
|
||||
if (position != -1) {
|
||||
if (position == AvRoomDataManager.POSITION_VIP_MIC) {
|
||||
tvNick.text = ""
|
||||
} else if (position != -1) {
|
||||
tvNick.text = "号${if (manMicro) "男神" else "女神"}位"
|
||||
}
|
||||
}
|
||||
@@ -111,7 +122,9 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
|
||||
}
|
||||
|
||||
inner class DatingBossMicroViewHolder internal constructor(itemView: View) : BossMicroViewHolder(itemView) {
|
||||
inner class DatingBossMicroViewHolder internal constructor(itemView: View) :
|
||||
BossMicroViewHolder(itemView) {
|
||||
private val rvVip: RecyclerView = itemView.findViewById(R.id.rv_vip)
|
||||
|
||||
public override fun bind(info: RoomQueueInfo, position: Int) {
|
||||
super.bind(info, position)
|
||||
@@ -119,6 +132,68 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
tvNick.alpha = 1f
|
||||
tvNick.text = "主持人"
|
||||
}
|
||||
|
||||
var adapter: VipMicroViewAdapter? = rvVip.adapter as? VipMicroViewAdapter
|
||||
if (adapter == null) {
|
||||
adapter = VipMicroViewAdapter(context)
|
||||
adapter.bindToRecyclerView(rvVip)
|
||||
adapter.setOnMicroItemClickListener(onMicroItemClickListener)
|
||||
}
|
||||
adapter.notifyDataSetChanged()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
inner class VipMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context) {
|
||||
|
||||
/**
|
||||
* Set LayoutManager and bind this to RecyclerView
|
||||
*/
|
||||
override fun bindToRecyclerView(recyclerView: RecyclerView) {
|
||||
val layoutManager = LinearLayoutManager(context)
|
||||
layoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.adapter = this
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return VipMicroViewHolder(
|
||||
LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_micro_dating_vip, parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, position: Int) {
|
||||
val roomQueueInfo =
|
||||
AvRoomDataManager.get()
|
||||
.getRoomQueueMemberInfoByMicPosition(AvRoomDataManager.POSITION_VIP_MIC)
|
||||
?: return
|
||||
(viewHolder as NormalMicroViewHolder).bind(
|
||||
roomQueueInfo,
|
||||
AvRoomDataManager.POSITION_VIP_MIC
|
||||
)
|
||||
}
|
||||
|
||||
override fun microType() = MICRO_TYPE_DATING_VIP
|
||||
|
||||
override fun getItemCount() = 1
|
||||
|
||||
inner class VipMicroViewHolder constructor(itemView: View) :
|
||||
DatingMicroViewHolder(itemView) {
|
||||
|
||||
override fun bind(info: RoomQueueInfo, position: Int) {
|
||||
super.bind(info, position)
|
||||
val roomInfo = AvRoomDataManager.get().mCurrentRoomInfo ?: return
|
||||
val roomMicInfo = info.mRoomMicInfo
|
||||
val uid = UserUtils.getUserUid()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -52,6 +52,7 @@ import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.super_admin.SuperAdminDataMrg;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.LogUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.base.PresenterEvent;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.callback.CallBack;
|
||||
@@ -288,6 +289,7 @@ public class AvRoomPresenter extends BaseMvpPresenter<IAvRoomView> {
|
||||
}
|
||||
//获取云信麦序相关信息
|
||||
String roomMicStr = (String) extension.get(Constants.KEY_CHAT_ROOM_INFO_MIC);
|
||||
LogUtils.d(roomMicStr);
|
||||
if (!TextUtils.isEmpty(roomMicStr)) {
|
||||
//清除魅力值(重新进房会触发退房,已经清除过了)
|
||||
GiftValueMrg.get().clearObsever();
|
||||
|
@@ -184,37 +184,47 @@ public class MicroView extends RelativeLayout implements View.OnLayoutChangeList
|
||||
View child;
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
child = recyclerView.getChildAt(i);
|
||||
int[] location = new int[2];
|
||||
// 找到头像
|
||||
View view = child.findViewById(R.id.micro_layout);
|
||||
if (view != null) child = view;
|
||||
child.getLocationInWindow(location);
|
||||
int x = (location[0] + child.getWidth() / 2) - giftWidth / 2;
|
||||
int y = (location[1] + child.getHeight() / 2) - giftHeight / 2;
|
||||
// 放置表情占位image view
|
||||
ImageView face = array.get(i - 1);
|
||||
LayoutParams params = new LayoutParams(giftHeight, giftHeight);
|
||||
child.getLocationInWindow(location);
|
||||
int[] containerLocation = new int[2];
|
||||
this.getLocationInWindow(containerLocation);
|
||||
params.leftMargin = ((location[0] - containerLocation[0] + child.getWidth() / 2) - giftHeight / 2);
|
||||
params.topMargin = ((location[1] - containerLocation[1] + child.getHeight() / 2) - giftHeight / 2);
|
||||
//如果不为空,只改变View的位置就行了
|
||||
if (face == null) {
|
||||
face = new ImageView(mContext);
|
||||
array.put(i - 1, face);
|
||||
face.setLayoutParams(params);
|
||||
addView(face);
|
||||
} else {
|
||||
face.setLayoutParams(params);
|
||||
addFaceView(array, centerPoints, child, i - 1);
|
||||
if (i == 0) {
|
||||
RecyclerView rvVip = child.findViewById(R.id.rv_vip);
|
||||
if (rvVip != null && rvVip.getChildCount() > 0) {
|
||||
addFaceView(array, centerPoints, rvVip.getChildAt(0), AvRoomDataManager.POSITION_VIP_MIC);
|
||||
}
|
||||
}
|
||||
Point point = new Point(x, y);
|
||||
centerPoints.put(i - 1, point);
|
||||
}
|
||||
AvRoomDataManager.get().mMicPointMap = centerPoints;
|
||||
return array;
|
||||
}
|
||||
|
||||
private void addFaceView(SparseArray<ImageView> array, SparseArray<Point> centerPoints, View child, int micPosition) {
|
||||
int[] location = new int[2];
|
||||
// 找到头像
|
||||
View view = child.findViewById(R.id.micro_layout);
|
||||
if (view != null) child = view;
|
||||
child.getLocationInWindow(location);
|
||||
int x = (location[0] + child.getWidth() / 2) - giftWidth / 2;
|
||||
int y = (location[1] + child.getHeight() / 2) - giftHeight / 2;
|
||||
// 放置表情占位image view
|
||||
ImageView face = array.get(micPosition);
|
||||
LayoutParams params = new LayoutParams(giftHeight, giftHeight);
|
||||
child.getLocationInWindow(location);
|
||||
int[] containerLocation = new int[2];
|
||||
this.getLocationInWindow(containerLocation);
|
||||
params.leftMargin = ((location[0] - containerLocation[0] + child.getWidth() / 2) - giftHeight / 2);
|
||||
params.topMargin = ((location[1] - containerLocation[1] + child.getHeight() / 2) - giftHeight / 2);
|
||||
//如果不为空,只改变View的位置就行了
|
||||
if (face == null) {
|
||||
face = new ImageView(mContext);
|
||||
array.put(micPosition, face);
|
||||
face.setLayoutParams(params);
|
||||
addView(face);
|
||||
} else {
|
||||
face.setLayoutParams(params);
|
||||
}
|
||||
Point point = new Point(x, y);
|
||||
centerPoints.put(micPosition, point);
|
||||
}
|
||||
|
||||
public BaseMicroViewAdapter getAdapter() {
|
||||
return (BaseMicroViewAdapter) recyclerView.getAdapter();
|
||||
}
|
||||
@@ -237,7 +247,7 @@ public class MicroView extends RelativeLayout implements View.OnLayoutChangeList
|
||||
giftWidth = UIUtil.dip2px(mContext, 80);
|
||||
giftHeight = UIUtil.dip2px(mContext, 80);
|
||||
|
||||
faceImageViews = new SparseArray<>(9);
|
||||
faceImageViews = new SparseArray<>(10);
|
||||
dragonBarImageViews = new SparseArray<>(9);
|
||||
|
||||
mBinding.setRoomInfo(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||
@@ -273,9 +283,17 @@ public class MicroView extends RelativeLayout implements View.OnLayoutChangeList
|
||||
int count = recyclerView.getChildCount();
|
||||
for (int i = 0; i < positions.size(); i++) {
|
||||
int pos = positions.get(i) + 1;
|
||||
if (pos >= count) continue;
|
||||
if (pos >= count && pos != AvRoomDataManager.POSITION_VIP_MIC + 1) continue;
|
||||
|
||||
final View speakState;
|
||||
//相亲模式VIP位置光圈
|
||||
if (pos == AvRoomDataManager.POSITION_VIP_MIC + 1) {
|
||||
speakState = ((RecyclerView) recyclerView.getChildAt(0).findViewById(R.id.rv_vip))
|
||||
.getChildAt(0).findViewById(R.id.iv_halo);
|
||||
} else {
|
||||
speakState = recyclerView.getChildAt(pos).findViewById(R.id.iv_halo);
|
||||
}
|
||||
|
||||
View speakState = recyclerView.getChildAt(getWavePosition(pos)).findViewById(R.id.iv_halo);
|
||||
if (speakState != null) {
|
||||
RoomQueueInfo roomQueueInfo = AvRoomDataManager.get().getRoomQueueMemberInfoByMicPosition(positions.get(i));
|
||||
if (roomQueueInfo == null) continue;
|
||||
|
BIN
app/src/main/res/drawable-xxhdpi/icon_room_dating_vip.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/icon_room_dating_vip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
@@ -26,8 +26,8 @@
|
||||
android:id="@+id/up_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_room_up_micro" />
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
android:id="@+id/lock_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_room_lock_micro"
|
||||
android:visibility="invisible"
|
||||
@@ -46,16 +46,16 @@
|
||||
android:id="@+id/view_gender_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:background="@drawable/shape_circle_micro_man_bg" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:src="@drawable/default_avatar"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
@@ -65,8 +65,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="2dp"
|
||||
/>
|
||||
android:layout_margin="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cap"
|
||||
@@ -96,8 +95,8 @@
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_room_mute_micro"
|
||||
android:visibility="visible"
|
||||
@@ -108,7 +107,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_nick"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
@@ -126,7 +125,7 @@
|
||||
android:includeFontPadding="false"
|
||||
android:text="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
android:textSize="9dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nick"
|
||||
@@ -134,11 +133,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="3dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:textSize="10dp"
|
||||
tools:text="狐仙嘎嘎" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -187,7 +186,7 @@
|
||||
android:id="@+id/ll_charm_click"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
|
@@ -270,4 +270,13 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_vip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_micro_dating_vip" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
225
app/src/main/res/layout/item_micro_dating_vip.xml
Normal file
225
app/src/main/res/layout/item_micro_dating_vip.xml
Normal file
@@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/color_activity_blue_bg">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/micro_layout"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:background="@color/red">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_halo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/up_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_room_up_micro" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/lock_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_room_lock_micro"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_gender_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:background="@drawable/shape_circle_micro_man_bg" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:src="@drawable/default_avatar"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_vip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:src="@drawable/icon_room_dating_vip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="1.5dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_selected_status"
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="@drawable/selector_dating_select_man_bg"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="未选择"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mute_image"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_room_mute_micro"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_nick"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/micro_layout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10dp"
|
||||
tools:text="狐仙嘎嘎" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/stv_clock"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingRight="@dimen/dp_10"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
app:corner="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_nick"
|
||||
app:solid="#33ffffff" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_parent_gift_value"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_center"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_center_of_charm"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="15dp"
|
||||
app:layout_constraintStart_toEndOf="@id/view_center"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_center"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_charm_click"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_center_of_charm"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_center_of_charm">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:background="@drawable/shape_bg_of_mic_charm"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_value_icon"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="3dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_gift_value" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_charm_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10dp"
|
||||
tools:text="123456" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -216,9 +216,6 @@ public final class AvRoomDataManager {
|
||||
* @return 对应队列信息
|
||||
*/
|
||||
public RoomQueueInfo getRoomQueueMemberInfoByMicPosition(int micPosition) {
|
||||
if (micPosition >= mMicQueueMemberMap.size()) {
|
||||
return null;
|
||||
}
|
||||
return mMicQueueMemberMap.get(micPosition);
|
||||
}
|
||||
|
||||
@@ -548,6 +545,11 @@ public final class AvRoomDataManager {
|
||||
*/
|
||||
public final static int POSITON_NOT_ON_MIC = Integer.MIN_VALUE;
|
||||
|
||||
/**
|
||||
* VIP麦位的位置
|
||||
*/
|
||||
public static final int POSITION_VIP_MIC = 999;
|
||||
|
||||
/**
|
||||
* 根据用户id去获取当前用户在麦上的位置
|
||||
*
|
||||
|
@@ -37,6 +37,7 @@ public class MicMemberInfo {
|
||||
private int selectMicPosition;
|
||||
//是否有选择心动对象
|
||||
private boolean hasSelectUser;
|
||||
private boolean isVipMic;
|
||||
|
||||
/**
|
||||
* GroupType_default = 0,//默认
|
||||
|
Reference in New Issue
Block a user