2

I am using RecyclerView with SwipeRefreshLayout and when the elements of RecyclerView increase, the notifyDataSetChanged blocks the indecator of SwipeRefreshLayout from cycling animation until the binding finished.

I have tired the following solutions but no success:

  1. How to use notifyDataSetChanged() in thread "using ui thread still blocking the animation"
  2. RecyclerView blocking ui thread during updates "optimizing update data set by update only the changed items will only minimize the blocking time but did not solve issue"

Any suggestions?

majdaldeen
  • 31
  • 1

1 Answers1

0

If you are simply updating one part of the view, use the notifyItemRangeChanged()or notifyItemChanged() instead of notifiyDataSetChanged().

try notifyItemChanged()

Avinash
  • 264
  • 5
  • 15