title: NestedScrollView in AppBarLayout cut off at screen height
body: <p>I have a <code>AppBarLayout</code> with a <code>NestedScrollView</code>. I am trying to make it display correctly and have a fling effect when it is displayed.</p>
  
  <p><strong>Originally</strong> I had this layout:</p>
  
  <pre><code> &lt;FrameLayout&gt;
      &lt;android.support.design.widget.CoordinatorLayout&gt;
          &lt;android.support.design.widget.AppBarLayout&gt;
              &lt;android.support.design.widget.CollapsingToolbarLayout&gt;
                  ...collapsing content
                  &lt;android.support.v7.widget.Toolbar/&gt;
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
          &lt;/android.support.design.widget.AppBarLayout&gt;
          &lt;android.support.v4.widget.NestedScrollView&gt;
              ...scrolling content
          &lt;/android.support.v4.widget.NestedScrollView&gt;
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>(with the <code>NestedScrollView</code> <strong>outside</strong> the <code>AppBarLayout</code>) It worked well but I could not fling the content when scrolling.</p>
  
  <p>I used the advice in <a href="https://stackoverflow.com/a/32454407/2946486">the accepted answer here</a>, using the layout pattern in <a href="https://stackoverflow.com/a/32174067/2946486">the answer referenced by the accepted one</a> and moved the content <strong>inside</strong> the <code>AppBarLayout</code>. It now flings nicely, but the content contained in the <code>NestedScrollView</code> is cut off at the height of the screen. As you begin to scroll up you immediately see the end of the views despite the content being much longer.</p>
  
  <p>My <strong>current</strong> Layout is this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
               xmlns:app="http://schemas.android.com/apk/res-auto"
               android:orientation="vertical"
               android:layout_width="match_parent"
               android:layout_height="wrap_content"&gt;
      &lt;android.support.design.widget.CoordinatorLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
          &lt;android.support.design.widget.AppBarLayout
              android:layout_width="match_parent"
              android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
              android:layout_height="wrap_content"&gt;
              &lt;android.support.design.widget.CollapsingToolbarLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  app:layout_scrollFlags="scroll|enterAlways"&gt;
                  &lt;android.support.v7.widget.Toolbar
                      android:id="@+id/toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="?attr/actionBarSize"
                      android:minHeight="?attr/actionBarSize"
                      app:layout_collapseMode="pin"
                      app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
              &lt;android.support.v4.widget.NestedScrollView
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior"
                  &gt;
              ... textviews etc
              &lt;/android.support.v4.widget.NestedScrollView&gt;
          &lt;/android.support.design.widget.AppBarLayout&gt;
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>I have tried substituting <code>wrap_content</code> with <code>match_height</code> but this doesn't seem to be the problem.</p>
  
  <p>I load all the content into <code>TextViews</code> via a webservice call and call <code>.RequestLayout();</code> on each <code>TextView</code> after I load the content.</p>
  
  <p><strong>edit</strong></p>
  
  <p>I have moved the <code>NestedScrollView</code> outside the <code>AppBarLayou</code> again. It flings when the <code>AppBarLayout</code> is collapsed, but not while it is open</p>