title: CollapsingToolbarLayout not working(collapsing)when scrolled
body: <p>I am trying to create a <code>CollapsingToolbarLayout</code> and below it a listview, when the listview is scrolled the Toolbar should collapse, but its not working when scrolled the Toolbar is not collapsing.</p>
  
  <p>Used this tutorial: <a href="http://android-developers.blogspot.in/2015_05_01_archive.html">http://android-developers.blogspot.in/2015_05_01_archive.html</a></p>
  
  <p>Note: The FrameLayout contains the listview</p>
  
  <pre><code>    &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="wrap_content"
          android:orientation="vertical"
          android:scrollbars="vertical"&gt;
  
          &lt;android.support.design.widget.AppBarLayout
              android:id="@+id/appbar"
              android:layout_width="match_parent"
              android:layout_height="192dp"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
              &lt;android.support.design.widget.CollapsingToolbarLayout
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
                  &lt;android.support.v7.widget.Toolbar
                      android:id="@+id/toolbara"
                      android:layout_width="match_parent"
                      android:layout_height="?attr/actionBarSize"
                      android:background="?attr/colorPrimary"
                      app:layout_collapseMode="pin"
                      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
          &lt;FrameLayout
              android:id="@+id/frame"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The framelayout code:</p>
  
  <pre><code>&lt;RelativeLayout 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"
      tools:context="ranjithnair02.com.supporttest.BlankFragment"&gt;
  
      &lt;ListView
          android:id="@+id/rcyv"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:layout_marginBottom="10dp"
          android:layout_marginRight="10dp"
          android:src="@android:drawable/ic_search_category_default"
          app:borderWidth="0dp"
          app:elevation="5dp"
          app:rippleColor="@color/wallet_highlighted_text_holo_light" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/rjulK.png" alt="enter image description here"></p>