title: Motion layout not animating views that are not its direct children
body: <p>I have recently tried the <code>MotionLayout</code>, I works fine on a button when it is a direct child of the <code>MotionLayout</code> but the same motion scene does not work,  when I enclose the button in another layout, bu the parent layout is still <code>MotionLayout</code>.</p>
  <p>First layout where the  button is direct child :-</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.motion.widget.MotionLayout
  
    xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;match_parent&quot;
    app:layoutDescription=&quot;@xml/demo&quot;
    android:layout_height=&quot;match_parent&quot;
    tools:context=&quot;.Demo&quot; &gt;
  
    &lt;Button
      android:layout_width=&quot;wrap_content&quot;
      app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
      app:layout_constraintEnd_toEndOf=&quot;parent&quot;
      app:layout_constraintStart_toStartOf=&quot;parent&quot;
      app:layout_constraintTop_toTopOf=&quot;parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:id=&quot;@+id/yellow_button&quot;
       /&gt;
  
  
    &lt;/androidx.constraintlayout.motion.widget.MotionLayout&gt;
  </code></pre>
  <p>Second layout where button is indirect child :-</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.motion.widget.MotionLayout
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:layout_width=&quot;match_parent&quot;
  app:layoutDescription=&quot;@xml/demo&quot;
  android:layout_height=&quot;match_parent&quot;
  tools:context=&quot;.Demo&quot;
  &gt;
  &lt;LinearLayout
     android:layout_width=&quot;match_parent&quot;
     android:id=&quot;@+id/l1&quot;
     app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
     app:layout_constraintEnd_toEndOf=&quot;parent&quot;
     app:layout_constraintStart_toStartOf=&quot;parent&quot;
     app:layout_constraintTop_toTopOf=&quot;parent&quot;
     android:layout_height=&quot;wrap_content&quot;&gt;
    &lt;Button
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:id=&quot;@+id/yellow_button&quot;/&gt;
   &lt;/LinearLayout&gt;
  
  &lt;/androidx.constraintlayout.motion.widget.MotionLayout&gt;
  </code></pre>
  <p>The motion scene layout is below:-</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;ConstraintSet android:id=&quot;@+id/start&quot;&gt;
      &lt;Constraint android:id=&quot;@+id/yellow_button&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; &gt;
  
          &lt;CustomAttribute app:attributeName=&quot;alpha&quot;
              app:customFloatValue=&quot;0.0&quot;/&gt;
  
      &lt;/Constraint&gt;
  &lt;/ConstraintSet&gt;
  
  &lt;ConstraintSet android:id=&quot;@+id/end&quot;&gt;
      &lt;Constraint android:id=&quot;@id/yellow_button&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:alpha=&quot;1.0&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          &gt;
  
          &lt;CustomAttribute app:attributeName=&quot;alpha&quot;
              app:customFloatValue=&quot;1.0&quot;/&gt;
  
      &lt;/Constraint&gt;
  
  &lt;/ConstraintSet&gt;
  
  &lt;Transition
      app:constraintSetEnd=&quot;@id/end&quot;
  
      app:autoTransition=&quot;animateToEnd&quot;
      app:constraintSetStart=&quot;@+id/start&quot;
      app:duration=&quot;2000&quot;/&gt;
  </code></pre>
  
  <p><strong>Is there any guideline that needs to be followed in these cases??</strong></p>
  <p>OR</p>
  <p><strong>Does this mean that only direct children of the <code>MotionLayout</code> can be animated with it?</strong></p>