From 63bc0cc3f76bec1f1d0e64f210610016369b91d7 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 30 Aug 2022 15:31:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=8A=82=E8=81=8A=E5=A4=A9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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 550687531..87ebb234b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3,7 +3,6 @@ package com.yunbao.live.views; import android.app.Activity; import android.app.Dialog; import android.content.Context; -import android.content.Intent; import android.graphics.Outline; import android.os.Bundle; import android.os.Handler; @@ -870,6 +869,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }); mBanner2.setVisibility(View.GONE); + if (fastMsgRecyclerView.getVisibility() == View.GONE) { + params1.bottomMargin = 0; + mChatRecyclerView.setLayoutParams(params1); + } // fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator()); } @@ -1533,8 +1536,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (guard != null) { nowGuardUser = guard; ViewGroup.LayoutParams params = userGuard.getLayoutParams(); - params.height=DpUtil.dp2px(30); - params.width=DpUtil.dp2px(30); + params.height = DpUtil.dp2px(30); + params.width = DpUtil.dp2px(30); userGuard.setLayoutParams(params); ImgLoader.displayAvatar(mContext, guard.getAvatar(), userGuard); gift_svga.setVisibility(View.VISIBLE); @@ -2310,7 +2313,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis fastMessageRecyclerViewAdapter.setMessage(greetings); RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams) mChatRecyclerView.getLayoutParams(); - params1.bottomMargin = 100; + if (greetings.size() > 0) { + params1.bottomMargin = 100; + }else { + params1.bottomMargin = 0; + } + + mChatRecyclerView.setLayoutParams(params1); }