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
Calling a Servlet from Jsp File on Page Load
Manifest Merger Failed:Attribute Application@Appcomponentfactory Cant Solve This
Custom Listview Click Issue on Items in Android
How to Make My Arrayadapter Follow the Viewholder Pattern
Why Does Tomcat Work with Port 8080 But Not 80
Execute External Program Through Terminal in Java
Best Way to Daemonize Java Application on Linux
Why Is Alternatives Command Used When Installing Java on a Linux MAChine
Java Installation Issues on Ubuntu
List Contents of Multiple Jar Files
MySQLsyntaxerrorexception Near "" When Trying to Execute Preparedstatement
Finish All Previous Activities
How to Whitelist App in Doze Mode Android 6.0
Illegalblocksizeexception When Trying to Encrypt and Decrypt a String with Aes
Difference Between Using Java.Library.Path and Ld_Library_Path
Low Java Single Process Thread Limit in Red Hat Linux
How to Set Up Sublime Text 3 to Run and Compile Java on Linux