title: Height of a child view is exceeding height of CoordinatorLayout
body: <p>Below are the xml code of my <code>MainActivity</code>, I think it's pretty standard:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      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"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_scrollFlags="scroll|enterAlways"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
              app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/&gt;
  
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/tabLayout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
              app:tabIndicatorColor="@android:color/white"
              app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
      android:id="@+id/viewPager"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"/&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>However, I got this result in preview:</p>
  
  <p><a href="https://i.stack.imgur.com/gVHzG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gVHzG.png" alt="enter image description here"></a></p>
  
  <p>Just for the sake of testing, I created an xml which contains text from A to N:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:padding="16dp"&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="AAA"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="BBB"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="CCC"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="DDD"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="EEE"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="FFF"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="GGG"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="HHH"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="III"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="JJJ"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="KKK"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="LLL"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="MMM"
              android:textSize="32dp"/&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:text="NNN"
              android:textSize="32dp"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>And here's the result on my Nexus 6, scrolled to the very bottom:</p>
  
  <p><a href="https://i.stack.imgur.com/tFTUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tFTUO.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the height of <code>ViewPager</code> is exceeding its parent layout causing some elements below clipped, and I wonder why? I'm using API level 23, it might be the root cause but I can't lower it down because I'm using a library that highly depends on API 23.</p>
  
  <p>Can someone clarify is this a bug? I can use <code>paddingBottom</code> or <code>layout_MarginBottom</code> as a quick solution but I don't think it's elegant.</p>