How to tell RecyclerView to start at specific item position

前端 未结 6 2134
难免孤独
难免孤独 2021-02-20 10:43

I want my RecyclerView with LinearLayoutManager to show up with scroll position at specific item after adapter got updated. (not first/last position) Means the at first (re-)lay

6条回答
  •  别跟我提以往
    2021-02-20 11:27

    You can try this, it will scroll to a position you want:

    rv.getLayoutManager().scrollToPosition(positionInTheAdapter).
    

提交回复
热议问题