Merge remote-tracking branch 'origin/yinyou_dating' into yinyou_develop
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;
|
||||
|
||||
|
@@ -7,6 +7,8 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.util.forEach
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@@ -45,9 +47,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,11 +64,13 @@ 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)
|
||||
private val ivCap: ImageView = itemView.findViewById(R.id.iv_cap)
|
||||
protected val ivVipWear: ImageView = itemView.findViewById(R.id.iv_vip_wear)
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public override fun bind(info: RoomQueueInfo, position: Int) {
|
||||
@@ -73,36 +83,58 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
viewGenderBg.setBackgroundResource(if (manMicro) R.drawable.shape_circle_micro_man_bg else R.drawable.shape_circle_micro_woman_bg)
|
||||
tvSelectedStatus.setBackgroundResource(if (manMicro) R.drawable.selector_dating_select_man_bg else R.drawable.selector_dating_select_woman_bg)
|
||||
}
|
||||
ivVipWear.setImageResource(R.drawable.icon_room_dating_vip)
|
||||
info.mChatRoomMember?.let {
|
||||
|
||||
if (roomInfo.blindDateState == RoomInfo.DATING_STATE_FLOW) {
|
||||
tvSelectedStatus.visibility = View.GONE
|
||||
tvSelectedStatus.isVisible = false
|
||||
} else {
|
||||
tvSelectedStatus.visibility = View.VISIBLE
|
||||
tvSelectedStatus.isVisible = true
|
||||
if (it.isHasSelectUser) {
|
||||
tvSelectedStatus.isSelected = true
|
||||
if (roomInfo.blindDateState == RoomInfo.DATING_STATE_PUBLISH ||
|
||||
uid == it.account.toLong() ||
|
||||
AvRoomDataManager.get().isPreside(uid)) {
|
||||
tvSelectedStatus.text = "选${it.selectMicPosition + 1}号"
|
||||
uid == it.account.toLong() ||
|
||||
AvRoomDataManager.get().isPreside(uid)
|
||||
) {
|
||||
tvSelectedStatus.text =
|
||||
if (AvRoomDataManager.get().isDatingVipMic(it.selectMicPosition)
|
||||
) "选VIP" else "选${it.selectMicPosition + 1}号"
|
||||
} else {
|
||||
tvSelectedStatus.text = "已选择"
|
||||
}
|
||||
if (it.isVipMic) {
|
||||
tvSelectedStatus.background = null
|
||||
ivVipWear.setImageResource(R.drawable.icon_room_dating_vip_have_present)
|
||||
}
|
||||
} else {
|
||||
tvSelectedStatus.isSelected = false
|
||||
tvSelectedStatus.text = "未选择"
|
||||
if (it.isVipMic) {
|
||||
tvSelectedStatus.isVisible = false
|
||||
ivVipWear.setImageResource(R.drawable.icon_room_dating_vip)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!it.capUrl.isNullOrEmpty()) {
|
||||
ivCap.load(it.capUrl, 0f, 0)
|
||||
ivCap.visibility = View.VISIBLE
|
||||
} else {
|
||||
ivCap.visibility = View.GONE
|
||||
}
|
||||
|
||||
ivVipWear.isVisible = it.isVipMic
|
||||
if (it.isVipMic) {
|
||||
ivHeadWear.isVisible = false
|
||||
}
|
||||
} ?: run {
|
||||
tvSelectedStatus.visibility = View.GONE
|
||||
ivCap.visibility = View.GONE
|
||||
if (position != -1) {
|
||||
tvSelectedStatus.isVisible = false
|
||||
ivCap.isVisible = false
|
||||
ivVipWear.isVisible = false
|
||||
if (AvRoomDataManager.POSITION_VIP_MIC == position) {
|
||||
tvNick.text = ""
|
||||
} else if (position != -1) {
|
||||
tvNick.text = "号${if (manMicro) "男神" else "女神"}位"
|
||||
}
|
||||
}
|
||||
@@ -111,14 +143,99 @@ 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)
|
||||
private val ivVipWear: ImageView = itemView.findViewById(R.id.iv_vip_wear)
|
||||
|
||||
public override fun bind(info: RoomQueueInfo, position: Int) {
|
||||
super.bind(info, position)
|
||||
if (info.mChatRoomMember == null) {
|
||||
tvNick.alpha = 1f
|
||||
tvNick.text = "主持人"
|
||||
ivVipWear.isVisible = false
|
||||
} else {
|
||||
if (info.mChatRoomMember.isVipMic) {
|
||||
ivHeadWear.isVisible = false
|
||||
ivVipWear.isVisible = true
|
||||
} else {
|
||||
ivVipWear.isVisible = false
|
||||
}
|
||||
}
|
||||
|
||||
val mMicQueueMemberMap = AvRoomDataManager.get().mMicQueueMemberMap
|
||||
var showVipMicro = true
|
||||
mMicQueueMemberMap.forEach { key, value ->
|
||||
value?.mChatRoomMember?.let {
|
||||
if (it.isVipMic && AvRoomDataManager.POSITION_VIP_MIC != key) {
|
||||
showVipMicro = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rvVip.isVisible = showVipMicro
|
||||
|
||||
if (showVipMicro) {
|
||||
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)
|
||||
ivVipWear.isVisible = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package com.yizhuan.erban.avroom.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.view.View;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.databinding.DialogDatingVipRuleBinding;
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.BaseBindingDialog;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_dating_vip_rule)
|
||||
public class DatingVipRuleDialog extends BaseBindingDialog<DialogDatingVipRuleBinding> implements View.OnClickListener {
|
||||
|
||||
|
||||
public DatingVipRuleDialog(Context context) {
|
||||
super(context, R.style.DialogFragment);
|
||||
}
|
||||
|
||||
public static DatingVipRuleDialog newInstance(Context context) {
|
||||
return new DatingVipRuleDialog(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
binding.setClick(this);
|
||||
binding.tvRule.setMovementMethod(ScrollingMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
closeDialog();
|
||||
}
|
||||
}
|
@@ -29,6 +29,7 @@ import androidx.viewpager.widget.ViewPager;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.coorchice.library.SuperTextView;
|
||||
import com.yizhuan.erban.avroom.dialog.DatingVipRuleDialog;
|
||||
import com.yizhuan.erban.ui.webview.DatingRuleWebViewActivity;
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView;
|
||||
@@ -1791,7 +1792,9 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
//禁用超管的上麦和抱TA上麦
|
||||
if (!SuperAdminUtil.isSuperAdmin()) {
|
||||
buttonItems.add(buttonItem4);
|
||||
buttonItems.add(buttonItem1);
|
||||
if (!AvRoomDataManager.get().isDatingVipMic(micPosition)) {
|
||||
buttonItems.add(buttonItem1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!AvRoomDataManager.get().isOpenPKMode()) {
|
||||
@@ -1801,7 +1804,9 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
buttonItems.add(buttonItem3);
|
||||
}
|
||||
} else {
|
||||
buttonItems.add(buttonItem3);
|
||||
if (!AvRoomDataManager.get().isDatingVipMic(micPosition)) {
|
||||
buttonItems.add(buttonItem3);
|
||||
}
|
||||
}
|
||||
}
|
||||
//超管只有闭麦操作
|
||||
@@ -1847,7 +1852,11 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
|
||||
@Override
|
||||
public void onUpMicBtnClick(int position, MicMemberInfo chatRoomMember) {
|
||||
getMvpPresenter().microPhonePositionClick(position, chatRoomMember);
|
||||
if (AvRoomDataManager.get().isDatingVipMic(position) && !AvRoomDataManager.get().isDatingVip(AuthModel.get().getCurrentUid())) {
|
||||
DatingVipRuleDialog.newInstance(mContext).show();
|
||||
} else {
|
||||
getMvpPresenter().microPhonePositionClick(position, chatRoomMember);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -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;
|
||||
|
@@ -247,7 +247,7 @@ public class RoomEffectView extends FrameLayout {
|
||||
.append(getShortString(notifyInfo.getOneUserNick(), 8), new ForegroundColorSpan(getResources().getColor(R.color.notice_nick)))
|
||||
.append("与", new ForegroundColorSpan(Color.WHITE))
|
||||
.append(getShortString(notifyInfo.getAnotherUserNick(), 8), new ForegroundColorSpan(getResources().getColor(R.color.notice_nick)))
|
||||
.append("在(" + getShortString(notifyInfo.getRoomTitle(), 10) + ")" + "牵手成功,快来见证吧!", new ForegroundColorSpan(Color.WHITE));
|
||||
.append("在(" + getShortString(notifyInfo.getRoomTitle(), 10) + ")" + notifyInfo.getSweetWords(), new ForegroundColorSpan(Color.WHITE));
|
||||
textView.setText(text.build());
|
||||
animationDatingAll = AnimationUtils.loadAnimation(mContext, R.anim.anim_box_notify);
|
||||
binding.flDatingAllNotify.addView(textView);
|
||||
|
@@ -1,8 +1,5 @@
|
||||
package com.yizhuan.erban.base;
|
||||
|
||||
import androidx.databinding.ObservableBoolean;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
/**
|
||||
* Created by huangmeng1 on 2018/5/7.
|
||||
*/
|
||||
|
@@ -2,7 +2,9 @@ package com.yizhuan.erban.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -13,6 +15,7 @@ import android.widget.TextView;
|
||||
import com.coorchice.library.SuperTextView;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.common.widget.CircleImageView;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.room.pk.bean.PKTeamInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
@@ -121,7 +124,11 @@ public class GiftAvatarAdapter extends RecyclerView.Adapter<GiftAvatarAdapter.Vi
|
||||
// 其他坑位
|
||||
holder.tvRoomOwner.setVisibility(View.GONE);
|
||||
holder.micNumber.setVisibility(View.VISIBLE);
|
||||
holder.micNumber.setText(String.valueOf(micMemberInfo.getMicPosition() + 1));
|
||||
if (micMemberInfo.getMicPosition() == AvRoomDataManager.POSITION_VIP_MIC) {
|
||||
holder.micNumber.setText("VIP");
|
||||
} else {
|
||||
holder.micNumber.setText(String.valueOf(micMemberInfo.getMicPosition() + 1));
|
||||
}
|
||||
if (micMemberInfo.isInPkMode()) {
|
||||
int boardColor = context.getResources().getColor(R.color.color_FFFFFF);
|
||||
int solidColor = context.getResources().getColor(R.color.appColor);
|
||||
|
@@ -3,12 +3,6 @@ package com.yizhuan.erban.ui.widget;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDialog;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -20,8 +14,12 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDialog;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
import com.netease.nim.uikit.common.util.media.ImageUtil;
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomKickOutEvent;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMessage;
|
||||
@@ -72,15 +70,17 @@ import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.BaseInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
|
||||
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.callback.CallBack;
|
||||
import com.yizhuan.xchat_android_library.utils.ImageUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -170,6 +170,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EventBus.getDefault().register(this);
|
||||
mCompositeDisposable = new CompositeDisposable();
|
||||
setContentView(R.layout.dialog_user_info);
|
||||
setCanceledOnTouchOutside(true);
|
||||
@@ -289,6 +290,15 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onDatingSelectUserEvent(DatingSelectUserEvent event) {
|
||||
try {
|
||||
dismiss();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param isVisiable ture则表示上麦的网格布局可见
|
||||
@@ -682,6 +692,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
mCompositeDisposable.dispose();
|
||||
mCompositeDisposable = null;
|
||||
}
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -782,6 +793,8 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
//目标用户是否是管理,(房主或者管理员)
|
||||
boolean isTargetManager = isTargetRoomOwner || isTargetRoomAdmin;
|
||||
boolean isTargetOnMic = AvRoomDataManager.get().isOnMic(account);
|
||||
boolean isTargetVip = AvRoomDataManager.get().isDatingVip(StringUtils.toLong(account)) ||
|
||||
AvRoomDataManager.get().isDatingVipMic(micPosition);
|
||||
//超管逻辑
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
if (isTargetOnMic) {
|
||||
@@ -804,7 +817,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
if (!roomMicInfo.isMicMute()) {
|
||||
buttonItems.add(createBanMicItem(micPosition));
|
||||
}
|
||||
if (!roomMicInfo.isMicLock()) {
|
||||
if (!roomMicInfo.isMicLock() && !isTargetVip) {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
}
|
||||
}
|
||||
@@ -840,7 +853,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
if (roomMicInfo.isMicLock()) {
|
||||
buttonItems.add(createUnLockMicItem(micPosition));
|
||||
} else {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
if (!isTargetVip) {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -856,7 +871,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
if (isTargetOnMic) {
|
||||
buttonItems.add(createKickMicItem());
|
||||
if (!isTargetVip) {
|
||||
buttonItems.add(createKickMicItem());
|
||||
}
|
||||
} else {
|
||||
handleInviteMicItem(buttonItems);
|
||||
}
|
||||
@@ -866,7 +883,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
if (roomMicInfo.isMicLock()) {
|
||||
buttonItems.add(createUnLockMicItem(micPosition));
|
||||
} else {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
if (!isTargetVip) {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -896,7 +915,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
if (roomMicInfo.isMicLock()) {
|
||||
buttonItems.add(createUnLockMicItem(micPosition));
|
||||
} else {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
if (!isTargetVip) {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -917,7 +938,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
//管理员能抱所有人上麦
|
||||
if (isTargetOnMic) {
|
||||
//管理员能抱管理员和游客下麦
|
||||
if (!isTargetRoomOwner) {
|
||||
if (!isTargetRoomOwner && !isTargetVip) {
|
||||
buttonItems.add(createKickMicItem());
|
||||
}
|
||||
} else {
|
||||
@@ -937,7 +958,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
if (roomMicInfo.isMicLock()) {
|
||||
buttonItems.add(createUnLockMicItem(micPosition));
|
||||
} else {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
if (!isTargetVip) {
|
||||
buttonItems.add(createLockMicItem(micPosition));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/bg_dating_vip_rule.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_dating_vip_rule.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_dating_vip_rule_close.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_dating_vip_rule_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
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 |
45
app/src/main/res/layout/dialog_dating_vip_rule.xml
Normal file
45
app/src/main/res/layout/dialog_dating_vip_rule.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="325dp"
|
||||
android:background="@drawable/bg_dating_vip_rule">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_rule"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:scrollbars="vertical"
|
||||
android:text="@string/text_dating_vip_rule"
|
||||
android:textColor="#FFF9BC"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_dating_vip_rule_close" />
|
||||
</LinearLayout>
|
||||
</layout>
|
@@ -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,27 +46,35 @@
|
||||
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" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_vip_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:src="@drawable/icon_room_dating_vip"
|
||||
android:visibility="gone" />
|
||||
|
||||
<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"
|
||||
/>
|
||||
android:layout_margin="2dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cap"
|
||||
@@ -81,7 +89,7 @@
|
||||
android:layout_width="37dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/selector_dating_select_man_bg"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
@@ -96,8 +104,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 +116,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 +134,7 @@
|
||||
android:includeFontPadding="false"
|
||||
android:text="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
android:textSize="9dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nick"
|
||||
@@ -134,11 +142,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 +195,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"
|
||||
|
@@ -49,6 +49,14 @@
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_vip_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:src="@drawable/icon_room_dating_vip"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head_wear"
|
||||
android:layout_width="match_parent"
|
||||
@@ -270,4 +278,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>
|
227
app/src/main/res/layout/item_micro_dating_vip.xml
Normal file
227
app/src/main/res/layout/item_micro_dating_vip.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?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_wear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:src="@drawable/icon_room_dating_vip"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<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="4dp"
|
||||
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>
|
@@ -37,11 +37,12 @@
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/mic_number"
|
||||
android:layout_width="@dimen/dp_11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_11"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:minWidth="@dimen/dp_11"
|
||||
android:textColor="#333333"
|
||||
android:textSize="8sp"
|
||||
app:corner="@dimen/dp_50"
|
||||
|
@@ -902,4 +902,5 @@
|
||||
<string name="app_privacy_policy">&app_name;隐私政策</string>
|
||||
<string name="about_app">关于&app_name;</string>
|
||||
<string name="authorization_text">并授权&app_name;获取本机号码</string>
|
||||
<string name="text_dating_vip_rule">1.每轮相亲在“自由交流”阶段累积送礼满999钻石且送礼价值最高的用户自动登上VIP席位;\n\n 2.若出现多个满足上VIP席位要求的用户,VIP席位最终由送礼价值最高的用户获得,若送礼价值相同以最先达到该值的用户为准;\n\n 3.VIP席位的用户可选择是否下麦,其他用户不可因此代替坐上席位; \n\n 4.用户只能在“自由交流”阶段抢夺VIP席位,“自由交流”阶段后直到结束本轮前,即使送出超过之前VIP总礼物价值也不能换人;\n\n 5.每轮相亲结束后VIP席位清空,下一轮重新开始抢位。</string>
|
||||
</resources>
|
||||
|
@@ -32,6 +32,7 @@ import com.yizhuan.xchat_android_core.room.ktv.event.KtvEvent;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomModeType;
|
||||
import com.yizhuan.xchat_android_core.super_admin.SuperAdminDataMrg;
|
||||
import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_library.rxbus.RxBus;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
|
||||
@@ -216,9 +217,6 @@ public final class AvRoomDataManager {
|
||||
* @return 对应队列信息
|
||||
*/
|
||||
public RoomQueueInfo getRoomQueueMemberInfoByMicPosition(int micPosition) {
|
||||
if (micPosition >= mMicQueueMemberMap.size()) {
|
||||
return null;
|
||||
}
|
||||
return mMicQueueMemberMap.get(micPosition);
|
||||
}
|
||||
|
||||
@@ -548,6 +546,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去获取当前用户在麦上的位置
|
||||
*
|
||||
@@ -1112,6 +1115,23 @@ public final class AvRoomDataManager {
|
||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getRoomModeType() == RoomModeType.OPEN_DATING_MODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true 相亲模式的VIP麦位
|
||||
*/
|
||||
public boolean isDatingVipMic(int position) {
|
||||
return position == AvRoomDataManager.POSITION_VIP_MIC ||
|
||||
isDatingVip(StringUtils.toLong(AvRoomDataManager.get().getRoomQueueMemberUidByMicPosition(position)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true 相亲模式的VIP
|
||||
*/
|
||||
public boolean isDatingVip(long uid) {
|
||||
return mCurrentRoomInfo != null &&
|
||||
mCurrentRoomInfo.getBlindDateVipUid() != 0 &&
|
||||
mCurrentRoomInfo.getBlindDateVipUid() == uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 相亲模式是否已经选择心动对象了
|
||||
*/
|
||||
|
@@ -4,40 +4,42 @@ import java.io.Serializable
|
||||
|
||||
data class DatingAllNotifyInfo(
|
||||
|
||||
/**
|
||||
* 消息唯一标识
|
||||
*/
|
||||
val messId: String,
|
||||
/**
|
||||
* 消息创建时间
|
||||
*/
|
||||
val messTime: Long,
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
val oneUserNick: String,
|
||||
/**
|
||||
* 另一个用户昵称
|
||||
*/
|
||||
val anotherUserNick: String,
|
||||
/**
|
||||
* 房间uid
|
||||
*/
|
||||
val roomUid: Long,
|
||||
/**
|
||||
* 房间title
|
||||
*/
|
||||
val roomTitle: String,
|
||||
/**
|
||||
* 飘屏图片地址
|
||||
*/
|
||||
val backgroundUrl: String,
|
||||
/**
|
||||
* 心动场景等级
|
||||
*/
|
||||
val joinHandLevel: Int,
|
||||
/**
|
||||
* 心动场景等级
|
||||
*/
|
||||
val joinHandName: String,
|
||||
/**
|
||||
* 消息唯一标识
|
||||
*/
|
||||
val messId: String,
|
||||
/**
|
||||
* 消息创建时间
|
||||
*/
|
||||
val messTime: Long,
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
val oneUserNick: String,
|
||||
/**
|
||||
* 另一个用户昵称
|
||||
*/
|
||||
val anotherUserNick: String,
|
||||
/**
|
||||
* 房间uid
|
||||
*/
|
||||
val roomUid: Long,
|
||||
/**
|
||||
* 房间title
|
||||
*/
|
||||
val roomTitle: String,
|
||||
/**
|
||||
* 飘屏图片地址
|
||||
*/
|
||||
val backgroundUrl: String,
|
||||
/**
|
||||
* 心动场景等级
|
||||
*/
|
||||
val joinHandLevel: Int,
|
||||
/**
|
||||
* 心动场景等级
|
||||
*/
|
||||
val joinHandName: String,
|
||||
|
||||
val sweetWords: String
|
||||
) : Serializable
|
@@ -179,6 +179,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
*/
|
||||
private String blindDateState = "";
|
||||
|
||||
private long blindDateVipUid;
|
||||
|
||||
private boolean canOpenBlindDate;
|
||||
|
||||
/**
|
||||
|
@@ -37,6 +37,7 @@ public class MicMemberInfo {
|
||||
private int selectMicPosition;
|
||||
//是否有选择心动对象
|
||||
private boolean hasSelectUser;
|
||||
private boolean vipMic;
|
||||
|
||||
/**
|
||||
* GroupType_default = 0,//默认
|
||||
|
@@ -9,13 +9,13 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* @Version 1.0
|
||||
* @ClassName: StringUtils
|
||||
* @Description: 字符串操作工具包
|
||||
* @Author zengweijie
|
||||
* @date 2013-8-6 下午1:51:14
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
*/
|
||||
public class StringUtils {
|
||||
private final static Pattern emailer = Pattern
|
||||
@@ -37,7 +37,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 将字符串转位日期类型
|
||||
*
|
||||
*
|
||||
* @param sdate
|
||||
* @return
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 以友好的方式显示时间
|
||||
*
|
||||
*
|
||||
* @param sdate
|
||||
* @return
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 判断给定字符串时间是否为今日
|
||||
*
|
||||
*
|
||||
* @param sdate
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -122,7 +122,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 判断给定字符串是否空白串。 空白串是指由空格、制表符、回车符、换行符组成的字符串 若输入字符串为null或空字符串,返回true
|
||||
*
|
||||
*
|
||||
* @param input
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -148,7 +148,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 判断是不是一个合法的电子邮件地址
|
||||
*
|
||||
*
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
@@ -167,7 +167,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 字符串转整数
|
||||
*
|
||||
*
|
||||
* @param str
|
||||
* @param defValue
|
||||
* @return
|
||||
@@ -182,7 +182,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 对象转整数
|
||||
*
|
||||
*
|
||||
* @param obj
|
||||
* @return 转换异常返回 0
|
||||
*/
|
||||
@@ -194,11 +194,12 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 对象转整数
|
||||
*
|
||||
*
|
||||
* @param obj
|
||||
* @return 转换异常返回 0
|
||||
*/
|
||||
public static long toLong(String obj) {
|
||||
if (obj == null) return 0;
|
||||
try {
|
||||
return Long.parseLong(obj);
|
||||
} catch (Exception e) {
|
||||
@@ -208,7 +209,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 字符串转布尔值
|
||||
*
|
||||
*
|
||||
* @param b
|
||||
* @return 转换异常返回 false
|
||||
*/
|
||||
@@ -232,7 +233,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* is null or its length is 0 or it is made by space
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* isBlank(null) = true;
|
||||
* isBlank("") = true;
|
||||
@@ -242,7 +243,7 @@ public class StringUtils {
|
||||
* isBlank(" a") = false;
|
||||
* isBlank("a b") = false;
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @param str
|
||||
* @return if string is null or its size is 0 or it is made by space, return
|
||||
* true, else return false.
|
||||
@@ -253,7 +254,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 技能人周期转换 描述这个方法的作用
|
||||
*
|
||||
*
|
||||
* @param arg0
|
||||
* @return
|
||||
* @Exception 异常对象
|
||||
@@ -327,7 +328,7 @@ public class StringUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @Title: splicing
|
||||
* @Description: 字符串拼接
|
||||
* @param @param str
|
||||
@@ -349,7 +350,7 @@ public class StringUtils {
|
||||
|
||||
/**
|
||||
* 删除最后字符
|
||||
*
|
||||
*
|
||||
* @param @param str
|
||||
* @return String 返回类型
|
||||
*/
|
||||
|
Reference in New Issue
Block a user