From cc48c7c2e8d426f6a45feca038d541ee1893fef6 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Mon, 7 Oct 2024 16:42:24 +0800 Subject: [PATCH] =?UTF-8?q?chat=5FrecyclerView=20=E9=97=B4=E8=B7=9D?= =?UTF-8?q?=E5=8A=A0=E5=9C=A8=E7=88=B6=E7=B1=BB=E8=80=8C=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E5=AD=90=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/drawable/bg_gift_send_btn.xml | 2 +- .../java/com/yunbao/live/adapter/LiveChatAdapter.java | 8 ++++---- live/src/main/res/layout/view_live_room.xml | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/src/main/res/drawable/bg_gift_send_btn.xml b/common/src/main/res/drawable/bg_gift_send_btn.xml index c4b04d999..6f3b6ddb3 100644 --- a/common/src/main/res/drawable/bg_gift_send_btn.xml +++ b/common/src/main/res/drawable/bg_gift_send_btn.xml @@ -8,7 +8,7 @@ - + diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 7fbdf6c85..11adb1ddf 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -292,14 +292,14 @@ public class LiveChatAdapter extends RecyclerView.Adapter { automatic_chat.setTextSize(fountSize); itemView.setTag(bean); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.setMargins(0, 0, DpUtil.dp2px(80), 0); + params.setMargins(0, 0, 0, 0); params.gravity = Gravity.CENTER_VERTICAL; mBg.setLayoutParams(params); if (bean.getType() == 6) {//大作战活动 view_action_game.setVisibility(View.VISIBLE); bean.setHeart(position); params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.setMargins(0, 0, 80, 12); + params.setMargins(0, 0, 0, 12); mBg.setLayoutParams(params); mTextView.setVisibility(View.GONE); @@ -452,7 +452,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { // } else if (bean.getType() == -2) {//自动消息,点击发言 LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params3.setMargins(0, 8, DpUtil.dp2px(80), 8); + params3.setMargins(0, 8, 0, 8); params3.gravity = Gravity.CENTER_VERTICAL; mBg.setLayoutParams(params3); mBg.setBackground(null); @@ -555,7 +555,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);*/ LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params3.setMargins(0, 8, DpUtil.dp2px(80), 8); + params3.setMargins(0, 8, 0, 8); params3.gravity = Gravity.CENTER_VERTICAL; mBg.setLayoutParams(params3); prank_open_live_layout.setVisibility(View.VISIBLE); diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 685dd6bc7..03828f5a7 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -204,6 +204,7 @@ android:layout_alignParentBottom="true" android:layout_marginTop="385dp" android:overScrollMode="never" + android:layout_marginEnd="80dp" android:scrollbars="none" />