I use the Line Layout Manager and RecyclerView with the LinearLayout Manager to populate some list of items. When I first display recyclerview and use:
linearLayoutManager.scrollToPosition(desiredindex);
he scrolls to the top exactly where I want.
Now here is the hardest part: when I scroll to the top of the recyclerview (i.e. the indexes of new items will be lower than the desiredindex ), I call:
linearLayoutManager.scrollToPosition(desiredindex);
It still works fine, but when the recyclerview scrolls beyond the desiredindex, the recycler view scrolls so that the desiredindex element falls down, not top, but I want the tile to scroll up and not down.
source share