Reputation: 464
I have a simple motion layout that changes from one layout to another.
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto"
xmlns:app="urn:oasis:names:tc:xliff:document:1.2">
<Transition
motion:constraintSetStart="@layout/activity_new"
motion:constraintSetEnd="@layout/activity_new_ii"
motion:duration="1000">
</Transition>
</MotionScene>
Here I also want to animate a layouts aplha which is a direct child of the motionlayout. The docs show constraint attributes applied to views individually. like in this atricle. How does one add the attribute to the transition between the layouts.
Upvotes: 0
Views: 550
Reputation: 182
You cannot use motion layout to animate between different layouts (i.e. layouts of different activities). Motion layout only animates the views inside of it. On the other hand, you could include both layouts that you want to transition inside of the motion layout and start from there...
Upvotes: 1