测试修改

This commit is contained in:
18401019693 2022-10-11 10:59:19 +08:00
parent 0a6471163c
commit 11d0afde56
2 changed files with 5 additions and 4 deletions

View File

@ -349,7 +349,8 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
}
}
public synchronized void insertItem(LiveChatBean bean) {
@SuppressLint("NotifyDataSetChanged")
public void insertItem(LiveChatBean bean) {
if (bean == null) {
return;
@ -373,7 +374,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
mPosition = size;
}
}
notifyItemChanged(getItemCount() - 1);
notifyDataSetChanged();
}

View File

@ -290,7 +290,7 @@
<RelativeLayout
android:id="@+id/chat_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:gravity="top"
android:orientation="vertical">
@ -298,7 +298,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/chat_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="370dp"
android:overScrollMode="never"
android:scrollbars="none" />