Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigomartind/e124787a41e9364ea6824f3f9472f6b2 to your computer and use it in GitHub Desktop.
Save rodrigomartind/e124787a41e9364ea6824f3f9472f6b2 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
...
<Transition
android:id="@+id/detailTransition"
app:constraintSetEnd="@+id/detailCard"
app:constraintSetStart="@id/start"
app:duration="1000">
<OnSwipe
app:dragDirection="dragUp"
app:onTouchUp="autoComplete"
app:touchRegionId="@id/cardCenter" />
</Transition>
<ConstraintSet android:id="@+id/start">
...
</ConstraintSet>
<ConstraintSet android:id="@+id/leftCard">
...
</ConstraintSet>
<ConstraintSet android:id="@+id/detailCard">
<Constraint android:id="@+id/cardCenter">
<Layout
android:layout_width="318dp"
android:layout_height="202dp"
android:layout_marginTop="96dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Transform
android:elevation="5dp"
android:rotation="0" />
</Constraint>
<Constraint android:id="@+id/cardRight1">
<Layout
android:layout_width="212dp"
android:layout_height="135dp"
app:layout_constraintCircle="@+id/guide"
app:layout_constraintCircleAngle="20"
app:layout_constraintCircleRadius="90dp" />
</Constraint>
<Constraint android:id="@+id/cardLeft1">
<Layout
android:layout_width="212dp"
android:layout_height="135dp"
app:layout_constraintCircle="@+id/guide"
app:layout_constraintCircleAngle="340"
app:layout_constraintCircleRadius="90dp" />
</Constraint>
</ConstraintSet>
</MotionScene>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment