RecyclerView.Adapter.notifyItemMoved(0,1) scrolls screen
问题 I have a RecyclerView managed by a LinearlayoutManager, if I swap item 1 with 0 and then call mAdapter.notifyItemMoved(0,1), the moving animation causes the screen to scroll. How can I prevent it? 回答1: Call scrollToPosition(0) after moving items. Unfortunately, i assume, LinearLayoutManager tries to keep first item stable, which moves so it moves the list with it. 回答2: Sadly the workaround presented by yigit scrolls the RecyclerView to the top. This is the best workaround I found till now: //