Reputation: 698
Is it possible to disable the refresh of the RecyclerView for the items already existing ? Because when I refresh the RecyclerView after adding new items, we can see visually the refreshing of the RecyclerView. I think we can see the refreshing because of the ImageView in each items.
So I want to disable notifydatasetchanged
for existing items.
Upvotes: 0
Views: 908
Reputation: 3506
If you're using RecyclerView
, you should use [notifyItemRangeInserted](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html#notifyItemRangeInserted(int, int)) method (and friends) to refresh only items that were added, instead of notifyDatasetChanged
. You can also refresh only items that have changed (notifyItemChanged
) or that an item has moved (notifyItemMoved
)
Upvotes: 1