修改聊天框长度

This commit is contained in:
18142669586 2023-04-08 14:14:06 +08:00
parent 8cbbd4015f
commit f7cf72f15f

View File

@ -220,7 +220,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
itemView.setTag(bean); itemView.setTag(bean);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(0, 0, DpUtil.dp2px(110), 0); params.setMargins(0, 0, DpUtil.dp2px(80), 0);
params.gravity = Gravity.CENTER_VERTICAL; params.gravity = Gravity.CENTER_VERTICAL;
mBg.setLayoutParams(params); mBg.setLayoutParams(params);
if (bean.getType() == 6) {//大作战活动 if (bean.getType() == 6) {//大作战活动
@ -373,7 +373,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
// } // }
else if (bean.getType() == -2) {//自动消息点击发言 else if (bean.getType() == -2) {//自动消息点击发言
LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params3.setMargins(0, 8, DpUtil.dp2px(110), 8); params3.setMargins(0, 8, DpUtil.dp2px(80), 8);
params3.gravity = Gravity.CENTER_VERTICAL; params3.gravity = Gravity.CENTER_VERTICAL;
mBg.setLayoutParams(params3); mBg.setLayoutParams(params3);
mBg.setBackground(null); mBg.setBackground(null);