0

Currently i have the next config.

RecyclerView + MutableLiveData + DiffUtils

The behavior is:

When i move to the last position and update the list, the RecyclerView move automatically to penultimate item, but only happen with the last position

David Hackro
  • 3,652
  • 6
  • 41
  • 61

1 Answers1

0
lst.insert(-1, lst.pop(0))

So it follows this syntax:

lst.insert(new_index, lst.pop(old-index))

Or if you don't know where Recycler View is:

lst.insert(-1, lst.pop(lst.index("Recycler View")))
DialFrost
  • 1,610
  • 1
  • 8
  • 28