I want to reverse the RecyclerView. One way to do this is:
LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
mLayoutManager.setReverseLayout(true);
mLayoutManager.setStackFromEnd(true);
// Set the layout manager to your recyclerView
recyclerView.setLayoutManager(mLayoutManager);
What is the difference if I set a reversed list to RecyclerView Adapter rather than calling setReverseLayout(true)
and setStackFromEnd(true)
on LayoutManager?