RecyclerView更新而无需刷新JAVA

我正在尝试构建一个聊天应用,当我想向自定义RecyclerView添加消息时,整个消息都会受到影响,并且它们会发生变化(特别是在添加图像时)。

I tried to do notifyItemChanged(position), but it got worse even. Here is my Adapter code:

 @NonNull
@Override
public MessageViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_message, null, false);
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

    layoutView.setLayoutParams(lp);

    MessageViewHolder rcv = new MessageViewHolder(layoutView);
    return rcv;
}

@Override
public void onBindViewHolder(@NonNull final MessageViewHolder holder, final int position) {


    holder.mMessage.setText(messageList.get(position).getMessage());
    holder.mSender.setText(messageList.get(position).getSenderId());
    Picasso.Builder builder = new Picasso.Builder(context);
    builder.downloader(new OkHttp3Downloader(context));
    builder.build().load(messageList.get(position).getProfilePic())
            .placeholder((R.drawable.image))
            .into(holder.imgprofile);

    if(!messageList.get(holder.getAdapterPosition()).getMediaUrlList().isEmpty()){
        holder.mViewMedia.setVisibility(View.VISIBLE);
        Picasso.Builder builder2 = new Picasso.Builder(context);
        builder2.downloader(new OkHttp3Downloader(context));
        builder2.build().load(messageList.get(holder.getAdapterPosition()).getMediaUrlList().get(0))
                .placeholder((R.drawable.ic_launcher_background))
                .error(R.drawable.ic_launcher_background)
                .into(holder.mViewMedia);

    }


    holder.mViewMedia.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            new ImageViewer.Builder(v.getContext(), messageList.get(holder.getAdapterPosition()).getMediaUrlList())
                    .setStartPosition(0)
                    .show();
        }
    });

}

@Override
public int getItemCount() {
    return messageList.size();
}





class MessageViewHolder extends RecyclerView.ViewHolder{
   //defining textviews and stuff..
    }
}

如果有人有任何想法,我会很高兴。