title: MotionLayout no animation
body: <p>I am trying to create a collapsing view animation via MotionLayout.  I want to make the view collapse when scrolling down and does not appear until the full scrolling up. My animation doesn't work now (<a href="https://www.youtube.com/watch?v=5c41mgw2TdM" rel="nofollow noreferrer">video</a>). Also my recycler view is not visible until the first click. What am I doing wrong? Thank</p>
  
  <p>MainActivity layout:</p>
  
  <pre><code>&lt;androidx.constraintlayout.motion.widget.MotionLayout
  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:background="@color/gray_more_white"
  
  app:layoutDescription="@xml/collapsing_toolbar"
  tools:showPaths="true"&gt;
  
  &lt;include
      android:id="@+id/include"
      layout="@layout/toolbar"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;com.github.florent37.shapeofview.shapes.ArcView
      android:id="@+id/header_view"
      android:layout_width="0dp"
      android:layout_height="100dp"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toBottomOf="@id/include"
      app:shape_arc_cropDirection="outside"
      app:shape_arc_height="20dp"
      app:shape_arc_position="bottom"&gt;
  
      &lt;View
          android:id="@+id/header"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/colorPrimaryDark" /&gt;
  
  &lt;/com.github.florent37.shapeofview.shapes.ArcView&gt;
  
  &lt;androidx.swiperefreshlayout.widget.SwipeRefreshLayout
      android:id="@+id/swipe_view"
      android:layout_width="0dp"
      android:layout_height="0dp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toBottomOf="@id/include"&gt;
  
      &lt;androidx.recyclerview.widget.RecyclerView
          android:id="@+id/recyclerView"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
  &lt;/androidx.swiperefreshlayout.widget.SwipeRefreshLayout&gt;
  
  &lt;/androidx.constraintlayout.motion.widget.MotionLayout&gt;
  </code></pre>
  
  <p>MotionScene:</p>
  
  <pre><code>&lt;MotionScene
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:motion="http://schemas.android.com/apk/res-auto"&gt;
  
  &lt;Transition
      app:constraintSetEnd="@id/end"
      app:constraintSetStart="@id/start"
      app:duration="1000"&gt;
  
      &lt;OnSwipe
          app:touchAnchorId="@id/swipe_view"
          app:dragDirection="dragDown"
          app:touchAnchorSide="top"
          app:moveWhenScrollAtTop="true"/&gt;
  &lt;/Transition&gt;
  
  &lt;ConstraintSet android:id="@+id/start"&gt;
      &lt;Constraint
          android:id="@id/header_view"
          android:layout_width="0dp"
          android:layout_height="100dp"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintTop_toBottomOf="@id/include"&gt;
      &lt;/Constraint&gt;
  &lt;/ConstraintSet&gt;
  
  &lt;ConstraintSet android:id="@+id/end"&gt;
      &lt;Constraint
          android:id="@id/header_view"
          android:layout_width="0dp"
          android:layout_height="0dp"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintTop_toBottomOf="@id/include"&gt;
      &lt;/Constraint&gt;
  &lt;/ConstraintSet&gt;
  
  &lt;/MotionScene&gt;
  </code></pre>