kotlinandroid-recyclerviewhorizontal-scrollinghorizontalscrollview

How to create a RecyclerView with horizontal scroll? - Kotlin


set this android:orientation="horizontal" app:reverseLayout="true" in the layout doesn't work.


Solution

  • When setting your layout manager set it like so in your Activity.kt file:

    mRecyclerView.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true);