Created
April 4, 2020 10:53
-
-
Save shkcodes/a40fc69b63d22b92d5dcb901cff0d1a8 to your computer and use it in GitHub Desktop.
Scene file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
motion:constraintSetEnd="@id/state_top" | |
motion:constraintSetStart="@id/state_mid" | |
motion:duration="300"> | |
<OnSwipe | |
motion:dragDirection="dragUp" | |
motion:maxAcceleration="100" | |
motion:touchAnchorId="@id/rectangle" /> | |
</Transition> | |
<Transition | |
motion:constraintSetEnd="@id/state_bottom" | |
motion:constraintSetStart="@id/state_mid" | |
motion:duration="300"> | |
<OnSwipe | |
motion:dragDirection="dragDown" | |
motion:maxAcceleration="100" | |
motion:touchAnchorId="@id/rectangle" /> | |
</Transition> | |
<ConstraintSet android:id="@+id/state_mid"> | |
<Constraint android:id="@id/rectangle"> | |
<Layout | |
android:layout_width="0dp" | |
android:layout_height="200dp" | |
motion:layout_constraintBottom_toBottomOf="parent" | |
motion:layout_constraintEnd_toEndOf="parent" | |
motion:layout_constraintStart_toStartOf="parent" | |
motion:layout_constraintTop_toTopOf="parent" /> | |
</Constraint> | |
</ConstraintSet> | |
<ConstraintSet | |
android:id="@+id/state_top" | |
motion:deriveConstraintsFrom="@id/state_mid"> | |
<Constraint android:id="@id/rectangle"> | |
<Layout | |
android:layout_width="0dp" | |
android:layout_height="200dp" | |
motion:layout_constraintEnd_toEndOf="parent" | |
motion:layout_constraintStart_toStartOf="parent" | |
motion:layout_constraintTop_toTopOf="parent" /> | |
</Constraint> | |
</ConstraintSet> | |
<ConstraintSet | |
android:id="@+id/state_bottom" | |
motion:deriveConstraintsFrom="@id/state_mid"> | |
<Constraint android:id="@id/rectangle"> | |
<Layout | |
android:layout_width="0dp" | |
android:layout_height="200dp" | |
motion:layout_constraintBottom_toBottomOf="parent" | |
motion:layout_constraintEnd_toEndOf="parent" | |
motion:layout_constraintStart_toStartOf="parent" /> | |
</Constraint> | |
</ConstraintSet> | |
</MotionScene> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment