Android Horizontal Scrolling RecyclerView

May 4, 2019

XML

<androidx.recyclerview.widget.RecyclerView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    app:layoutManager="LinearLayoutManager"
    />

Code

LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
recyclerView.setLayoutManager(layoutManager);
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.