From d72a9a39c66a7d86c806a660bb87b2b3bbc4ae00 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 20 Mar 2024 16:29:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/presenter/LiveGiftAnimPresenter.java | 4 +++- live/src/main/res/layout/view_live_room.xml | 1 + .../views/MainHomeLiveItemViewHolder.java | 18 ++++++++++----- .../main/res/layout/item_main_home_lives.xml | 23 ++++++++++--------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java index 8eaa36cf4..2e49d2817 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -1027,11 +1027,12 @@ public class LiveGiftAnimPresenter { View mGifGiftTipGroupBuyGuardNew; LinearLayout guardAllServerNotifyBg; TextView mGifGiftTipBuyGuardNew; - View mIvLookBuyGuardNew; + TextView mIvLookBuyGuardNew; NewAllServerNotifyGuardEvent notifyGuardEvent; public void showBuyGuardGiftAnimNew(NewAllServerNotifyGuardEvent event) { notifyGuardEvent = event; + mRoomNum = event.getLiveuid(); if (mShowAllServer) { if (mGifAll != null) { LiveReceiveGiftBean bean = new LiveReceiveGiftBean(); @@ -1079,6 +1080,7 @@ public class LiveGiftAnimPresenter { mIvLookBuyGuardNew.setVisibility(View.GONE); } else { mIvLookBuyGuardNew.setVisibility(View.VISIBLE); + mIvLookBuyGuardNew.setText(WordUtil.isNewZh()?"圍觀":"Views"); } mGifGiftTipShowAnimatorBuyGuardNew.start(); diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index a55110ae9..c3b46ceac 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -1199,6 +1199,7 @@ android:background="@mipmap/btn_king_guard_onlookers" android:gravity="center" android:text="@string/onlookers" + android:clickable="true" android:textColor="@color/white" android:textSize="12sp" /> diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java index d316e985c..b8d7b257f 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java @@ -3,7 +3,9 @@ package com.yunbao.main.views; import android.content.Context; import android.text.TextUtils; import android.view.View; +import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -151,17 +153,21 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { } else { viewBg.setVisibility(View.GONE); } + RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams(); if (bean.getRedPacketStatus() == 1) { + dragon_moneyLayoutParams.leftMargin = DpUtil.dp2px(35); redPacket.setVisibility(View.VISIBLE); } else { + dragon_moneyLayoutParams.leftMargin = DpUtil.dp2px(20); redPacket.setVisibility(View.GONE); - if (bean.getSendMoneyLongStatus() == 1) { - dragon_money.setVisibility(View.VISIBLE); - } else { - dragon_money.setVisibility(View.GONE); - } - } + } + if (bean.getSendMoneyLongStatus() == 1) { + dragon_money.setLayoutParams(dragon_moneyLayoutParams); + dragon_money.setVisibility(View.VISIBLE); + } else { + dragon_money.setVisibility(View.GONE); + } RxView.clicks(itemView) .throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件 .subscribe(new Observer() { diff --git a/main/src/main/res/layout/item_main_home_lives.xml b/main/src/main/res/layout/item_main_home_lives.xml index e9a7dbfd1..0cc6afbfa 100644 --- a/main/src/main/res/layout/item_main_home_lives.xml +++ b/main/src/main/res/layout/item_main_home_lives.xml @@ -286,6 +286,18 @@ + + - \ No newline at end of file