Here is a screenshot of what is happening:

For some reason, the last card of the RecyclerView is not showing up properly. This is a weird occurrence especially since the RecyclerView is just wrapping content.
<android.support.v7.widget.RecyclerView
android:id="@+id/cardList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginLeft="8dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
Why might something like this occur? How can I make it so that the RecyclerView is not cut off?
Solved by poss: https://stackoverflow.com/users/4048794/poss
choosing wrap_content as the attribute for layout_width and layout_height causes the cut-off on RecyclerViews
RecyclerView cannot have WRAP_CONTENT as layout_height. The solution is to set layout_height to a specific value like "100dp", like the following:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="100dp"
...
/>
Now if the value in the xml is not what you want, you can set layout_height in the code using requestLayout();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With