I have a motion layout with this layoutDescription: app:layoutDescription="@xml/scene"
scene.xml
<MotionScene
xmlns:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetStart="@layout/view_home_card_start"
motion:constraintSetEnd="@layout/view_home_card_end"
motion:duration="1000">
<OnSwipe
motion:touchAnchorId="@+id/button"
motion:touchAnchorSide="left"
motion:dragDirection="dragLeft" />
</Transition>
</MotionScene>
I think that the xml of view_home_card_start
and view_home_card_end
is irrelevant.
How can I call this animation programatically?
question from:
https://stackoverflow.com/questions/52437946/start-motion-scene-programmatically 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…