0

I'm creating an app, where listitems are showing into recyclerview. And the newly listitem is showing at the end of the list. So I'm using below code to add the new list item into list.

recyclerViewList.add(newListItem);
recyclerViewAdapter.notifyItemInserted(recyclerViewList.size() - 1);

When I'm adding the newListItem into list it causes previous item delete and add both item.(Blink last 2 items.) I've tried the notifyDataSetChanged that also does not work for me.

Please help me here what I'm doing wrong here.

Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78

1 Answers1

0

I had the blinking problem when I thought i called the notifyItemChanged function once. In fact I called it multiple times. Check to make sure that you dont call it more often than necessary.