<?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"> <Transition android:id="@+id/transition_to_end" motion:constraintSetStart="@+id/start" motion:constraintSetEnd="@+id/end" motion:autoTransition="animateToStart" motion:duration="100"> <OnSwipe motion:touchAnchorId="@+id/button" motion:touchAnchorSide="right" motion:onTouchUp="autoCompleteToEnd" motion:dragDirection="dragRight" /> </Transition> <Transition android:id="@+id/transition_to_start" motion:constraintSetStart="@+id/end" motion:constraintSetEnd="@+id/start" motion:autoTransition="animateToEnd"> </Transition> <ConstraintSet android:id="@+id/start"> <Constraint android:id="@+id/button" android:layout_width="64dp" android:layout_height="64dp" motion:layout_constraintBottom_toBottomOf="parent" motion:layout_constraintStart_toStartOf="parent" motion:layout_constraintTop_toTopOf="parent" /> </ConstraintSet> <ConstraintSet android:id="@+id/end"> <Constraint android:id="@+id/button" android:layout_width="64dp" android:layout_height="64dp" motion:layout_constraintBottom_toBottomOf="parent" motion:layout_constraintStart_toEndOf="parent" motion:layout_constraintTop_toTopOf="parent"/> </ConstraintSet> </MotionScene>