Recyclerview Horizontal Scrolling to Left

Android Horizontal RecyclerView scroll Direction

Assuming you use LinearLayoutManager in your RecyclerView, then you can pass true as third argument in the LinearLayoutManager constructor.

For example:

mRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true));

If you are using the StaggeredGridLayoutManager, then you can use the setReverseLayout method it provides.

RecyclerView Horizontal Scrollview example How to create horizontal recyclerview ? Horizontal scrollview example


LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);
recyclerView.setLayoutManager(linearLayoutManager);

Horizontal RecyclerView - when selected item is out of viewport (scrolling left/right), change background of the most left/right item

to get the right most item, you can use findLastCompletelyVisibleItemPosition() and to get the left most item, you can use findFirstCompletelyVisibleItemPosition()



Related Topics



Leave a reply



Submit