title: Anchoring imageViews to the Collapsing Toolbar
body: <p><a href="https://i.stack.imgur.com/uoARK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uoARK.png" alt="enter image description here"></a></p>
  
  <p>In this image they have implemented a Collapsing Toolbar with a parallax ImageView and a FAB anchored to the Toolbar. In the app I'm making, I need to anchor an ImageView instead of a Floating Action Button while still keeping all the fade out and in animations. How do I do this? </p>
  
  <p>My current </p>
  
  <blockquote>
    <p>activity_main.xml</p>
  </blockquote>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout 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"
  android:fitsSystemWindows="true"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:id="@+id/bar"
      android:layout_width="match_parent"
      android:layout_height="252dp"
      android:fitsSystemWindows="true"&gt;
  
      &lt;android.support.design.widget.CollapsingToolbarLayout
          android:id="@+id/collapsing_toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fitsSystemWindows="true"
          app:contentScrim="?attr/colorPrimary"
          app:expandedTitleMarginBottom="32dp"
          app:expandedTitleMarginEnd="64dp"
          app:expandedTitleMarginStart="48dp"
          app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
          &lt;ImageView
              android:id="@+id/header"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/random"
              android:fitsSystemWindows="true"
              android:scaleType="centerCrop"
              app:layout_collapseMode="parallax" /&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/anim_toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_collapseMode="pin"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light" &gt;
              &lt;ImageView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"/&gt;
  
          &lt;/android.support.v7.widget.Toolbar&gt;
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/scrollableview"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;com.example.sudarshan.testapp.MLRoundedImageView
      android:layout_width="152dp"
      android:layout_height="152dp"
      app:layout_anchor="@+id/bar"
      app:layout_anchorGravity="bottom|center"
      android:id="@+id/circularImage"/&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>The ImageView gets anchored but it does not disappear and reappear like the FAB does. </p>