title: unable to scroll gridview embeded in nestedscrollview
body: <p>my gridview does not scroll.  i have 10 items in the gridview but only 6 show and some of the items at the bottom at cut off. </p>
  
  <p>Here is the layout of the gridview:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:id="@+id/appbar_layout"
      android:layout_height="@dimen/app_bar_height"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
      &lt;android.support.design.widget.CollapsingToolbarLayout
          android:id="@+id/collapsing_toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:contentScrim="?attr/colorPrimary"
          app:expandedTitleMarginStart="@dimen/expanded_toolbar_title_margin_start"
          app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
          &lt;ImageView
              android:id="@+id/image_view"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:scaleType="centerInside"
              android:src="@drawable/yelp"
              app:layout_collapseMode="parallax"
              app:layout_collapseParallaxMultiplier="0.7" /&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_collapseMode="pin"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
              app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /&gt;
  
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:id="@+id/nestedscrollview"
      android:layout_height="match_parent"
      android:fillViewport="true"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/gridContainerLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          &gt;
  
  
          &lt;GridView
              android:id="@+id/grid"
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:columnWidth="100dp"
              android:gravity="center"
              android:listSelector="#00000000"
              android:numColumns="auto_fit"
              android:stretchMode="columnWidth"
              /&gt;
  
          &lt;ProgressBar
              android:id="@+id/progressBar1"
              style="?android:attr/progressBarStyleLarge"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
             android:layout_centerHorizontal="true" /&gt;
  
      &lt;/RelativeLayout&gt;
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>and here are two photos of the issue.  when i scroll upwards it pushes the yelp image up but it wont do the nested scrolling on the gridview, why ?</p>
  
  <p><a href="https://i.stack.imgur.com/FkrrL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FkrrL.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/3FaLQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3FaLQ.png" alt="enter image description here"></a></p>
  
  <p>UPDATE:
  i also tried doing this:</p>
  
  <pre><code>if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
              mGridView.setNestedScrollingEnabled(true);
          }
  </code></pre>
  
  <p>AND IT STARTED WORKING ON API lollipop. But i need it to run on older devices also. why wont it scroll on devices before lollipop ?</p>