-1

i am developing an app that load data inside recyclerview, when i scroll to top of my recyclerview (position 0) i will load more data, after loading new data recyclerview position changed, but i want to set FirstVisibleItemPosition manually, is there any way to do this?

Farrokh
  • 1,167
  • 1
  • 7
  • 18

1 Answers1

0

i solved the problem by this solution
when i add some data to my adapter, i called

adapter.notifyItemRangeChanged(...);

that was wrong.then i changed it to

adapter.notifyItemInserted(...)

and now it works.

Farrokh
  • 1,167
  • 1
  • 7
  • 18