调节聊天列表高度

This commit is contained in:
18401019693 2022-08-30 15:31:07 +08:00
parent b84d830627
commit 63bc0cc3f7

View File

@ -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());
}
@ -2310,7 +2313,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
fastMessageRecyclerViewAdapter.setMessage(greetings);
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
mChatRecyclerView.getLayoutParams();
if (greetings.size() > 0) {
params1.bottomMargin = 100;
}else {
params1.bottomMargin = 0;
}
mChatRecyclerView.setLayoutParams(params1);
}