Is there a way to "deriveConstraintsFrom" from motionlayout?

Viewed 731

I am using MotionLayout to animate recyclerview in complex layout(220 line of code). There are lots of views in layout and I had to write all of views constraints to MotionScene "start"(Otherwise everything messed up in layout). The only view that animate is recyclerview and it seemed wrong to me to write all views constraints to MotionScene. Is there a way to keep layout's views constraints like >motion:deriveConstraintsFrom="layout"< and add only the animated views constraints to MotionScene.

<Constraint android:id="@id/groupSelectionButton">
       <Layout
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          motion:layout_constraintLeft_toLeftOf="parent"
          motion:layout_constraintRight_toRightOf="parent"
          motion:layout_constraintTop_toTopOf="parent"/>
</Constraint>
1 Answers

It was introduced in 2.0.0-alpha5 You can use it as below

app:deriveConstraintsFrom = "@id/start”
Related