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 afa464378..b94c6972d 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -783,6 +783,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (mLiveUserAdapter != null) { JSONObject obj = JSON.parseObject(info[0]); List list = JSON.parseArray(obj.getString("userlist"), LiveUserGiftBean.class); + if(list.size()>3){ + ViewGroup.LayoutParams layoutParams = mUserRecyclerView.getLayoutParams(); + layoutParams.height=DpUtil.dp2px(100); + mUserRecyclerView.setLayoutParams(layoutParams); + } mLiveUserAdapter.refreshList(list); } } @@ -1167,7 +1172,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * @param hot 热度值 */ public void setHotData(String hot) { - if (mHotText != null) { + if (mHotText != null&&!TextUtils.isEmpty(hot)) { mHotText.setText(hot); } @@ -1968,7 +1973,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void showGiftMessage(LiveReceiveGiftBean bean) { mVotes.setText(bean.getVotes()); room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num())); - setHotData(formatBigNum.formatBigNum(bean.getLiveChatBean().getHot_num())); + setHotData(formatBigNum.formatBigNum(bean.getHot_num())); mTvMedalRank.setText(bean.getMedalRankNum()); if (mLiveGiftAnimPresenter == null) { mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager); @@ -1982,7 +1987,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void showGiftMessage(LiveReceiveGiftBean bean, boolean isAncher) { mVotes.setText(bean.getVotes()); room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num())); - setHotData(formatBigNum.formatBigNum(bean.getLiveChatBean().getHot_num())); + setHotData(formatBigNum.formatBigNum(bean.getHot_num())); mTvMedalRank.setText(bean.getMedalRankNum()); //开通粉丝勋章成功弹窗 if (!isAncher && bean.getMedalFirstGet() != null && bean.getMedalFirstGet().equals("1") @@ -2004,6 +2009,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager); } mLiveGiftAnimPresenter.showBuyGuardGiftAnim(bean); + setHotData(bean.getHot_num()); } //全服通知 购买坐骑 diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 9aa526484..3bb52be1b 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -177,6 +177,7 @@ android:layout_height="wrap_content" android:layout_alignBottom="@id/group_1" android:layout_marginLeft="15dp" + android:layout_marginEnd="10dp" android:layout_toRightOf="@id/group_1">