title: Using RecyclerView inside ViewPager inside ContraintLayout
body: <p>I'm using a <code>ConstraintLayout</code> for my view. Inside it I placed a <code>ViewPager</code> and one of the views that the adapter contains is a <code>RecyclerView</code>.</p>
  
  <p>When I try to put just images, there's a missing height where I can't scroll anymore. That height looks to be the same than the space I'm using on the top (<code>Toolbar</code> + <code>TabLayout</code>).</p>
  
  <p><strong>When using <code>RelativeLayout</code> instead of <code>ConstraintLayout</code> it works</strong></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:layout_height="match_parent"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/homeToolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="@color/toolbarColor"&gt;
  
          &lt;android.support.v7.widget.AppCompatImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_marginLeft="8dp"
              android:padding="7dp"
              android:src="@drawable/ic_menu"
              tools:ignore="RtlHardcoded" /&gt;
  
          &lt;android.support.v7.widget.AppCompatImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true" /&gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"
              android:gravity="center"
              android:orientation="horizontal"
              tools:ignore="RtlHardcoded"&gt;
  
              &lt;android.support.v7.widget.AppCompatImageView
                  style="@style/RippleEffect"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginRight="5dp"
                  android:padding="7dp" /&gt;
  
              &lt;android.support.v7.widget.AppCompatImageView
                  style="@style/RippleEffect"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginRight="5dp"
                  android:padding="7dp"
                  android:src="@drawable/ic_search" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;android.support.design.widget.TabLayout
          android:id="@+id/homeTabLayout"
          android:layout_width="match_parent"
          android:layout_height="50dp"
          android:background="@color/toolbarColor"
          app:layout_constraintTop_toBottomOf="@+id/homeToolbar"
          app:tabMode="scrollable" /&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/homeViewPager"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          app:layout_constraintTop_toBottomOf="@+id/homeTabLayout"
  
          /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>This is what I see (see the last Darth Vader)</p>
  
  <p><a href="https://i.stack.imgur.com/VOqTe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VOqTe.jpg" alt="enter image description here"></a></p>