Skip to content

Instantly share code, notes, and snippets.

@PiotrPrus
Created August 17, 2019 13:08
Show Gist options
  • Save PiotrPrus/c6ecde13fb013314f95535f392c33827 to your computer and use it in GitHub Desktop.
Save PiotrPrus/c6ecde13fb013314f95535f392c33827 to your computer and use it in GitHub Desktop.
like msg scene that scale down by 5%
<?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/endScene"
motion:constraintSetStart="@id/startScene"
motion:duration="600" />
<ConstraintSet android:id="@+id/startScene">
<Constraint
android:id="@+id/rootCL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleX="1.05"
android:scaleY="1.05"
android:alpha="0.0" />
<Constraint
android:id="@+id/backgroundIV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
<Constraint
android:id="@+id/mainIV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</ConstraintSet>
<ConstraintSet android:id="@+id/endScene">
<Constraint
android:id="@+id/rootCL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleX="0.95"
android:scaleY="0.95" />
<Constraint
android:id="@+id/backgroundIV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
<Constraint
android:id="@+id/mainIV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:scaleX="0.95"
android:scaleY="0.95" />
</ConstraintSet>
</MotionScene>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment