酒吧 撩她动画播放 and setTime 显示。
This commit is contained in:
@@ -50,7 +50,7 @@ import java.net.URL;
|
||||
|
||||
public abstract class BaseWheatView extends ConstraintLayout implements IBaseWheat {
|
||||
public ImageView mRiv;
|
||||
public ImageView mIvGift;
|
||||
|
||||
public WheatCharmView mCharmView;
|
||||
public TextView mTvName;
|
||||
public ImageView mIvSex;
|
||||
@@ -73,9 +73,6 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
public static final String WHEAT_HOST = "9";//主持位
|
||||
|
||||
public float oX;
|
||||
public float oY;
|
||||
|
||||
boolean closePhone = false;//自己麦位关闭话筒,用于判断声纹显示
|
||||
|
||||
public String pitNumber;
|
||||
@@ -105,7 +102,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
super(context, attrs, defStyleAttr);
|
||||
inflate(context, getLayoutId(), this);
|
||||
mRiv = findViewById(R.id.riv);
|
||||
mIvGift = findViewById(R.id.iv_gift);
|
||||
// mIvGift = findViewById(R.id.iv_gift);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mTvName = findViewById(R.id.tv_name);
|
||||
mIvSex = findViewById(R.id.iv_sex);
|
||||
@@ -122,8 +119,6 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
tv_zhul = findViewById(R.id.tv_zhul);
|
||||
setClipChildren(false);
|
||||
setClipToPadding(false);
|
||||
oX = mIvGift.getX();
|
||||
oY = mIvGift.getY();
|
||||
initPit(context, attrs);
|
||||
}
|
||||
|
||||
@@ -505,14 +500,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@Override
|
||||
public void showGift(RoomGiveGiftModel.GiftListBean listBean) {
|
||||
if (!showGiftAnim) {
|
||||
mIvGift.setVisibility(GONE);
|
||||
return;
|
||||
}
|
||||
if (listBean.getUser_id() == null || !listBean.getUser_id().equals(pitBean.getUser_id())) {
|
||||
return;
|
||||
}
|
||||
WheatGiftAnim.addGift(mIvGift, listBean.getPicture());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -125,6 +125,10 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
val bean = mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||
view.setData(bean)
|
||||
|
||||
if (idx == 0 && mUserInfo?.user_id.toString() == bean.user_id) {
|
||||
mBinding.ivSetTime.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if (idx != 0 && idx != 1) {
|
||||
if (!TextUtils.isEmpty(bean.user_id) && !bean.user_id.equals("0")) {
|
||||
startTimer(bean.end_time.toLong())
|
||||
@@ -308,12 +312,18 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
|
||||
fun event1003(messageEvent: RoomMessageEvent) {
|
||||
val pitNumber = messageEvent.text.pit_number
|
||||
|
||||
if (indexList.contains(pitNumber)) {
|
||||
val viewPos = indexList.indexOf(pitNumber)
|
||||
val pitBean = mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1]
|
||||
pitBean.end_time = messageEvent.text.end_time
|
||||
viewList[viewPos].setData(pitBean)
|
||||
|
||||
if (mUserInfo?.user_id.toString() == pitBean.user_id) {
|
||||
mBinding.ivSetTime.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
startTimer(messageEvent.text.end_time.toLong())
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.xscm.modulemain.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.media.Image
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
@@ -15,7 +14,6 @@ import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
import com.xscm.moduleutil.widget.AvatarFrameView
|
||||
import com.xscm.moduleutil.widget.BaseWheatView
|
||||
import com.xscm.moduleutil.widget.WheatGiftAnim
|
||||
|
||||
class RoomPubWheatView : BaseWheatView {
|
||||
constructor(context: Context?) : super(context)
|
||||
@@ -35,10 +33,11 @@ class RoomPubWheatView : BaseWheatView {
|
||||
private var hostTv: TextView? = null
|
||||
private var tv_time: TextView? = null
|
||||
private var ll_bottom: LinearLayout? = null
|
||||
private var iv_gift: ImageView? = null
|
||||
private var iv_gift: AvatarFrameView? = null
|
||||
var ivYueT: ImageView? = null
|
||||
var ivLiaoT: ImageView? = null
|
||||
|
||||
|
||||
override fun initPit(context: Context, attrs: AttributeSet) {
|
||||
var typedArray: TypedArray? = null
|
||||
try {
|
||||
@@ -77,10 +76,6 @@ class RoomPubWheatView : BaseWheatView {
|
||||
this.pitNumber = number
|
||||
}
|
||||
|
||||
fun setHostTv(hostTv: TextView) {
|
||||
this.hostTv = hostTv
|
||||
}
|
||||
|
||||
public override fun setPitData(bean: RoomPitBean) {
|
||||
pitBean = bean // 统一使用参数 bean
|
||||
stopAndClearAnimation() // 清理之前的动画资源
|
||||
@@ -103,7 +98,7 @@ class RoomPubWheatView : BaseWheatView {
|
||||
|
||||
else -> {
|
||||
tv_time?.visibility = View.INVISIBLE
|
||||
ll_bottom?.visibility = View.GONE
|
||||
ll_bottom?.visibility = View.INVISIBLE
|
||||
iv_custom_gift?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -121,10 +116,9 @@ class RoomPubWheatView : BaseWheatView {
|
||||
fun setSex(value: String?, format: Boolean) {
|
||||
mCharmView.setSex("", "", value, format)
|
||||
}
|
||||
|
||||
fun setPitGift(giftPlayString: String) {
|
||||
mIvGift?.visibility = VISIBLE
|
||||
WheatGiftAnim.addGift(mIvGift, giftPlayString);
|
||||
fun setPitGift(giftPlayString: String){
|
||||
iv_gift?.visibility=VISIBLE
|
||||
iv_gift?.setSource(giftPlayString, 2)
|
||||
}
|
||||
|
||||
private fun handleOnState(bean: RoomPitBean) {
|
||||
@@ -155,7 +149,7 @@ class RoomPubWheatView : BaseWheatView {
|
||||
|
||||
private val pitNumberText: String
|
||||
get() {
|
||||
return "虚位以待"
|
||||
return pitNumber+"号麦"
|
||||
}
|
||||
|
||||
private fun handleOffState(bean: RoomPitBean) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/icon_left_set_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6" />
|
||||
|
||||
<ImageView
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
Reference in New Issue
Block a user