Last Item in recyclerview is cut off : <p>I am using recyclerview to display a list of items and constraint layout is the parent view. The layout is displayed  below: </p>

<pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;android.support.constraint.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:layout_height="match_parent"&gt;

        &lt;!-- Load the toolbar here --&gt;
        &lt;android.support.v7.widget.Toolbar
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/toolbar"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:fitsSystemWindows="true"
            android:minHeight="?android:attr/actionBarSize"
            app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            android:background="@color/colorPrimary"/&gt;

        &lt;android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:visibility="visible"
            app:layout_constraintTop_toBottomOf="@+id/toolbar" /&gt;

        &lt;ImageView
            android:id="@+id/imageViewContent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintBottom_toTopOf="parent"
            android:visibility="gone"
            android:src="@drawable/empty_category"/&gt;

        &lt;TextView
            android:id="@+id/textViewContent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:gravity="center"
            android:text="Empty Category"
            android:textStyle="bold"
            android:textColor="@color/colorPrimary"
            android:textAppearance="@style/TextAppearance.AppCompat.Large"
            android:visibility="gone"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/imageViewContent" /&gt;

    &lt;/android.support.constraint.ConstraintLayout&gt;

The adapter layout for each row is presented below:

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"&gt;

    &lt;FrameLayout
        android:id="@+id/framelayoutImage"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/buttonCart"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"&gt;

        &lt;ImageView
            android:id="@+id/imageViewCoverArt"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:scaleType="center" /&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="#59000000"
            android:orientation="vertical"&gt;

            &lt;TextView
                android:id="@+id/textViewPrice"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|left"
                android:layout_marginLeft="10dp"
                android:clickable="false"
                android:text="$220"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                android:textColor="@android:color/white"
                android:textStyle="bold" /&gt;

            &lt;TextView
                android:id="@+id/textViewDetails"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|left"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="8dp"
                android:ellipsize="end"
                android:maxLength="17"
                android:maxLines="1"
                android:text="Lorem ipsum dolor sit amet, consecte"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                android:textColor="@android:color/white" /&gt;

        &lt;/LinearLayout&gt;

    &lt;/FrameLayout&gt;

    &lt;Button
        android:id="@+id/buttonCart"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="8dp"
        android:background="@drawable/buttonshape"
        android:text="Add to Cart"
        android:textAppearance="@style/TextAppearance.AppCompat.Small"
        android:textColor="@android:color/white"
        android:textStyle="bold"
     /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>After running my application the layouts are presented in the image below:</p>

<p><a href="https://i.stack.imgur.com/dnhfp.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/dnhfp.jpg" alt="enter image description here"></a></p>

<p>I tried adding a bottom margin to the recycle view, but this has not resolved the issue. I used the following links as references: <a href="https://stackoverflow.com/questions/32742724/recyclerview-is-cutting-off-the-last-item/32743510">RecyclerView is cutting off the last item</a>, <a href="https://stackoverflow.com/questions/31097219/recyclerview-cutting-off-last-item">RecyclerView cutting off last item</a> and tried making those changes with no luck </p>
