Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Created March 21, 2020 17:52
Show Gist options
  • Save tmaxxdd/64ec76f854264e03140e969d80ee847c to your computer and use it in GitHub Desktop.
Save tmaxxdd/64ec76f854264e03140e969d80ee847c 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:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@+id/start"
motion:duration="500"
motion:motionInterpolator="linear">
<OnClick
motion:clickAction="transitionToEnd"
motion:targetId="@id/card" />
</Transition>
<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@+id/card"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="16dp"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent">
<CustomAttribute
motion:attributeName="radius"
motion:customDimension="200dp" />
<CustomAttribute
motion:attributeName="cardBackgroundColor"
motion:customColorValue="#ff99cc00" />
</Constraint>
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/card"
android:layout_width="0dp"
android:layout_height="400dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
motion:layout_constraintBottom_toBottomOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent">
<CustomAttribute
motion:attributeName="radius"
motion:customDimension="8dp" />
<CustomAttribute
motion:attributeName="cardBackgroundColor"
motion:customColorValue="#ffffff" />
</Constraint>
</ConstraintSet>
</MotionScene>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment