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