From 362bcce5f678db98db683d0ecc20985cfc4a5cf7 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Sat, 28 Sep 2024 17:45:21 +0800 Subject: [PATCH] =?UTF-8?q?git=E5=BF=BD=E7=95=A5/outputs/apk=20=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A/TabLayout/build=20=E7=9B=B4=E6=92=AD=E7=9A=84?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81=E5=A2=9E=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB=E5=92=8C=E4=B8=8B=E8=B7=9D=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++- .../yunbao/live/views/LiveRoomViewHolder.java | 25 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e45f11744..4d2c27d43 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ local.properties /live/build/ /main/build/ /video/build/ -/tmp/full-r8-config.txt \ No newline at end of file +/tmp/full-r8-config.txt +/outputs/apk +/TabLayout/build diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 6b3e5b064..02732481d 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -206,6 +206,8 @@ import com.yunbao.live.presenter.LiveLightAnimPresenter; import com.yunbao.live.utils.LiveRoomVoteManager; import com.yunbao.live.utils.LiveTextRender; +import net.lucode.hackware.magicindicator.buildins.UIUtil; + import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -1961,7 +1963,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis voteManager.setMarginPosition(topMargin + DpUtil.dp2px(50)); RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) mChatRecyclerView.getLayoutParams(); - params1.topMargin = DpUtil.dp2px(65); + + if (isAnchorLive()) {//普通用户的聊天栏更高一些 + //将layout_marginBottom修改为0 其余不变 + params1.topMargin = DpUtil.dp2px(65); + params1.bottomMargin = 0; + mChatRecyclerView.setLayoutParams(params1); + }else { + params1.topMargin = DpUtil.dp2px(80); + } mChatRecyclerView.setLayoutParams(params1); mChatRecyclerView.setHasFixedSize(true); @@ -2241,7 +2251,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis //点击的消息发送出去 ((LiveActivity) mContext).sendChatMessage(msg, null, null); fastMsgRecyclerView.setVisibility(View.GONE); - params1.bottomMargin = 0; + params1.bottomMargin = DpUtil.dp2px(10); mChatRecyclerView.setLayoutParams(params1); RelativeLayout.LayoutParams params2 = (RelativeLayout.LayoutParams) newMessage.getLayoutParams(); RelativeLayout.LayoutParams params3 = (RelativeLayout.LayoutParams) atMessage.getLayoutParams(); @@ -2261,7 +2271,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }); // mBanner2.setVisibility(View.GONE); if (fastMsgRecyclerView.getVisibility() == View.GONE) { - params1.bottomMargin = 0; + if (isAnchorLive()){ + params1.bottomMargin =0; + }else { + params1.bottomMargin = DpUtil.dp2px(10); + } mChatRecyclerView.setLayoutParams(params1); } // fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator()); @@ -5621,11 +5635,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) mChatRecyclerView.getLayoutParams(); if (greetings.size() > 0) { params1.bottomMargin = 100; - } else { + } else if(isAnchorLive()){ params1.bottomMargin = 0; + }else { + params1.bottomMargin = DpUtil.dp2px(10); } - mChatRecyclerView.setLayoutParams(params1); }