title: Collapsing toolbar animation doesn't move
body: <p>I was implementing the collapse toolbar in my app , it should be all right but the bar is not restricted .. does not move does nothing !!!</p>
  
  <p>This is my layout.xml</p>
  
  <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"
      android:id="@+id/coordinatorLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"&gt;
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="192dp"
          android:fitsSystemWindows="true"
          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"
              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/background"
                  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;/android.support.design.widget.CollapsingToolbarLayout&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="@dimen/fab_button_margin_right"
          android:clickable="true"
          android:src="@drawable/fab_ic_add"
          app:layout_anchor="@+id/appbar"
          app:layout_anchorGravity="bottom|right|end" /&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>And this is my activity</p>
  
  <pre><code>    public class Profile extends AppCompatActivity implements View.OnClickListener{
      private Toolbar toolbar;
      private CollapsingToolbarLayout collapsingToolbar;
      int mutedColor = R.attr.colorPrimary;
      FloatingActionButton fab;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.profile);
  
          final Toolbar toolbar = (Toolbar) findViewById(R.id.anim_toolbar);
          setSupportActionBar(toolbar);
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
          collapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
          collapsingToolbar.setTitle("Hello!");
  
          ImageView header = (ImageView) findViewById(R.id.header);
  
          Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
                  R.drawable.background);
          fab = (FloatingActionButton) findViewById(R.id.fab);
          if(fab != null)
              fab.setOnClickListener(this);
          Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
              @Override
              public void onGenerated(Palette palette) {
  
                  mutedColor = palette.getMutedColor(R.attr.colorPrimary);
                  collapsingToolbar.setContentScrimColor(mutedColor);
              }
          });
  
      }
  
  }
  </code></pre>
  
  <p>please tell me why , thanks in advance!</p>
  
  <p><strong>UPDATE:</strong>
  I've solved the problem with NestedScrollView, i do something like this:</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"
      xmlns:card="http://schemas.android.com/tools"
      android:id="@+id/rootLayout"
      android:fitsSystemWindows="true"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="380dp"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
          android:fitsSystemWindows="true"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/collapsingToolbarLayout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"
              app:expandedTitleMarginStart="48dp"
              app:expandedTitleMarginEnd="64dp"
              android:fitsSystemWindows="true"&gt;
  
              &lt;ImageView
                  android:id="@+id/header"
                  android:src="@drawable/background"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:scaleType="centerCrop"
                  android:fitsSystemWindows="true"
                  app:layout_collapseMode="parallax"/&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbarAction"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                  app:layout_collapseMode="pin" /&gt;
  
  
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          android:id="@+id/scroll"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:clipToPadding="false"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
  
          &lt;!-- List of something --&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="@dimen/fab_button_margin_right"
          android:clickable="true"
          android:src="@drawable/user"
          app:backgroundTint="@color/testPrimaryDark"
          app:layout_anchor="@+id/appbar"
          app:layout_anchorGravity="bottom|right|end" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>