title: Motionlayout two transitions not working properly
body: <p>We are creating a transitions like youtube. We have exo player area and recyclerview underneath.</p>
  <ol>
  <li>When user drags top player area it should collapse and become mini player.</li>
  <li>When vertical video comes(9:16), scrolling recyclerview should minimise player view height to default 16:9 height.</li>
  </ol>
  <p>Both of these transitions independently are working fine.</p>
  <p>I have created two transitions for this in a motion file.One transition is from player area onswipe and other is from recyclerview underneath.Both of these transitions independently are working fine.If we switch off first one, second one works and vice verse.</p>
  <p>Problem is both of these motion files are not working parallely. Only the first transition is working for each case. Below is my scene file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;MotionScene xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;&gt;
  
  &lt;Transition
      android:id=&quot;@+id/transition_mini_player&quot;
      app:constraintSetEnd=&quot;@id/collapsed&quot;
      app:constraintSetStart=&quot;@id/expanded&quot;
      app:duration=&quot;300&quot;
      app:motionInterpolator=&quot;easeInOut&quot;&gt;
  
      &lt;OnSwipe
          app:dragDirection=&quot;dragDown&quot;
          app:maxAcceleration=&quot;200&quot;
          app:touchAnchorId=&quot;@+id/player_holder&quot;
          app:touchAnchorSide=&quot;bottom&quot; /&gt;
  
      &lt;KeyFrameSet&gt;
  
          &lt;KeyAttribute
              android:alpha=&quot;0&quot;
              app:framePosition=&quot;5&quot;
              app:motionTarget=&quot;@id/toolbar&quot; /&gt;
  
          &lt;KeyAttribute
              android:alpha=&quot;0&quot;
              app:framePosition=&quot;5&quot;
              app:motionTarget=&quot;@id/video_controller_container&quot; /&gt;
  
          &lt;KeyAttribute
              android:alpha=&quot;0&quot;
              app:framePosition=&quot;5&quot;
              app:motionTarget=&quot;@id/play_pause_button&quot; /&gt;
  
          &lt;KeyAttribute
              app:motionTarget=&quot;@+id/close_imageView&quot;
              app:framePosition=&quot;90&quot;
              android:alpha=&quot;0&quot; /&gt;
          &lt;KeyAttribute
              app:motionTarget=&quot;@+id/play_imageView&quot;
              app:framePosition=&quot;90&quot;
              android:alpha=&quot;0&quot; /&gt;
          &lt;KeyAttribute
              app:motionTarget=&quot;@+id/next_imageView&quot;
              app:framePosition=&quot;90&quot;
              android:alpha=&quot;0&quot; /&gt;
          &lt;KeyAttribute
              app:motionTarget=&quot;@+id/title_textView&quot;
              app:framePosition=&quot;95&quot;
              android:alpha=&quot;0&quot; /&gt;
  
          &lt;KeyAttribute
              app:framePosition=&quot;0&quot;
              app:motionTarget=&quot;@id/player_holder&quot;&gt;
              &lt;CustomAttribute
                  app:attributeName=&quot;EndPadding&quot;
                  app:customDimension=&quot;@dimen/video_view_right_padding&quot; /&gt;
          &lt;/KeyAttribute&gt;
  
          &lt;KeyAttribute
              app:framePosition=&quot;20&quot;
              app:motionTarget=&quot;@id/player_holder&quot;&gt;
              &lt;CustomAttribute
                  app:attributeName=&quot;EndPadding&quot;
                  app:customDimension=&quot;0dp&quot; /&gt;
          &lt;/KeyAttribute&gt;
  
          &lt;KeyAttribute
              app:framePosition=&quot;0&quot;
              app:motionTarget=&quot;@id/viewContainer&quot;&gt;
              &lt;CustomAttribute
                  app:attributeName=&quot;cardElevation&quot;
                  app:customDimension=&quot;5dp&quot; /&gt;
          &lt;/KeyAttribute&gt;
  
          &lt;KeyAttribute
              app:framePosition=&quot;3&quot;
              app:motionTarget=&quot;@id/viewContainer&quot;&gt;
              &lt;CustomAttribute
                  app:attributeName=&quot;cardElevation&quot;
                  app:customDimension=&quot;0dp&quot; /&gt;
          &lt;/KeyAttribute&gt;
  
      &lt;/KeyFrameSet&gt;
  &lt;/Transition&gt;
  
  &lt;Transition
      android:id=&quot;@+id/vertical_transition&quot;
      app:constraintSetEnd=&quot;@id/verticalCollapse&quot;
      app:constraintSetStart=&quot;@id/expanded&quot;
      app:motionInterpolator=&quot;easeIn&quot;
      app:duration=&quot;500&quot;&gt;
  
      &lt;OnSwipe
          app:dragDirection=&quot;dragUp&quot;
          app:touchAnchorId=&quot;@id/recycler_view&quot;
          app:touchRegionId=&quot;@id/recycler_view&quot;
          app:moveWhenScrollAtTop=&quot;true&quot;
          app:touchAnchorSide=&quot;top&quot; /&gt;
  
  &lt;/Transition&gt;
  &lt;ConstraintSet android:id=&quot;@+id/expanded&quot;&gt;
      &lt;Constraint
          android:id=&quot;@id/toolbar&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;?actionBarSize&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          app:visibilityMode=&quot;ignore&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/play_pause_button&quot;
          android:layout_width=&quot;30dp&quot;
          android:layout_height=&quot;30dp&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@+id/player_holder&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/player_holder&quot;
          app:visibilityMode=&quot;ignore&quot;
          /&gt;
  &lt;/ConstraintSet&gt;
  
  &lt;ConstraintSet android:id=&quot;@+id/collapsed&quot;&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/toolbar&quot;
          android:alpha=&quot;0&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@id/viewContainer&quot;
          android:layout_height=&quot;60dp&quot;
          android:layout_marginBottom=&quot;65dp&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot; /&gt;
  
     &lt;!-- &lt;Constraint
          android:id=&quot;@+id/player_parent&quot;
          android:layout_height=&quot;60dp&quot;
          android:layout_width=&quot;100dp&quot;
          app:layout_constraintStart_toStartOf=&quot;@+id/viewContainer&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/viewContainer&quot; /&gt;--&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/player_holder&quot;
          android:layout_height=&quot;60dp&quot;
          android:layout_width=&quot;100dp&quot;
          app:layout_constraintStart_toStartOf=&quot;@+id/viewContainer&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/viewContainer&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/video_controller_container&quot;
          android:alpha=&quot;0&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@+id/player_holder&quot;
          app:layout_constraintEnd_toStartOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;/&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/play_pause_button&quot;
          android:alpha=&quot;0&quot;
          /&gt;
  
      &lt;Constraint
          android:id=&quot;@id/recycler_view&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;parent&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/close_imageView&quot;
          app:layout_constraintEnd_toEndOf=&quot;@id/viewContainer&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@id/viewContainer&quot;
          android:layout_marginEnd=&quot;16dp&quot;
          android:alpha=&quot;1&quot;
          app:layout_constraintTop_toTopOf=&quot;@id/viewContainer&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/next_imageView&quot;
          app:layout_constraintEnd_toStartOf=&quot;@+id/close_imageView&quot;
          android:layout_width=&quot;30dp&quot;
          android:layout_height=&quot;30dp&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@+id/close_imageView&quot;
          android:layout_marginEnd=&quot;24dp&quot;
          android:alpha=&quot;1&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/close_imageView&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/play_imageView&quot;
          app:layout_constraintEnd_toStartOf=&quot;@+id/next_imageView&quot;
          android:layout_width=&quot;30dp&quot;
          android:layout_height=&quot;30dp&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@+id/next_imageView&quot;
          android:layout_marginEnd=&quot;24dp&quot;
          android:alpha=&quot;1&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/next_imageView&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/title_textView&quot;
          app:layout_constraintEnd_toStartOf=&quot;@+id/play_imageView&quot;
          app:layout_constraintStart_toEndOf=&quot;@+id/player_holder&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintBottom_toBottomOf=&quot;@+id/play_imageView&quot;
          android:layout_marginEnd=&quot;12dp&quot;
          android:alpha=&quot;1&quot;
          android:layout_marginStart=&quot;8dp&quot;
          app:layout_constraintTop_toTopOf=&quot;@+id/play_imageView&quot; /&gt;
  
  &lt;/ConstraintSet&gt;
  
  &lt;ConstraintSet android:id=&quot;@+id/verticalCollapse&quot;&gt;
  
      &lt;Constraint
          android:id=&quot;@id/toolbar&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;?actionBarSize&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          app:visibilityMode=&quot;ignore&quot; /&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/player_holder&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;208dp&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/toolbar&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintBottom_toTopOf=&quot;@+id/recycler_view&quot;/&gt;
  
      &lt;Constraint
          android:id=&quot;@+id/recycler_view&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/player_holder&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;/&gt;
  
  
  &lt;/ConstraintSet&gt;
  </code></pre>
  
  <p>How can I make both these transitions run successfully and not affecting each other?</p>