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); }