I have a little problem with Motionlayout. I want to expand img from 0 to for example 350 dp width and 250 dp height on the top of the screen but in the middle horizontal. Now my image is expanding but is doing this from left down side not middle. I would like to start and end expanding in center horizontal. Where is problem?
Here is my scene:
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:autoTransition="animateToEnd"
motion:duration="1500"
>
</Transition>
<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="0dp"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintRight_toRightOf="parent"
/>
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/imageView"
android:layout_width="350dp"
android:layout_height="250dp"
motion:layout_constraintTop_toTopOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintRight_toRightOf="parent"
/>
</ConstraintSet>
Here is foto how it looks in AndroidStudio: