I use LinearLayoutManager to show RecyclerView list horizontally
XML
<android.support.v7.widget.RecyclerView
android:id="@+id/dailyOffersList"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Code
dailyOffersList.adapter = DailyOffersListAdapter(dailyOffer)
dailyOffersList.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
It is XML of item and it has width as wrap_content https://codeshare.io/5XnldM
But there empty space int the end of list, and it happens only if it horizontally, like this
in the end
Change the
match_parent
in the xml towrap_content
.match_parent
is supposed to fill the whole with of the screen.