1

I have some data in a RecyclerView that's readily available and some data that takes some time to load. So what I'm trying to do is immediately display the available data and only update records that have additional data once it's done loading. I'm able to achieve this via notifyItemChanged(position) however the RecyclerView scrolls to the top every time the method is called. Is there a way to prevent the scrolling from happening anytime data is only being updated and not inserted/removed?

Leonardo Casale
  • 472
  • 5
  • 13

1 Answers1

-3

I figured it out, I wasn't calling notifyItemChanged from the UI thread. Once I moved it to there it works as intended.

notifyDataSetChanged() makes the list refresh and scroll jumps back to the top

Community
  • 1
  • 1
Leonardo Casale
  • 472
  • 5
  • 13