Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Last active May 16, 2020 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaxxdd/f211d0607f931917bea344bfc6b56025 to your computer and use it in GitHub Desktop.
Save tmaxxdd/f211d0607f931917bea344bfc6b56025 to your computer and use it in GitHub Desktop.
<MotionScene>
<!-- You must implement all the attributes -->
<ConstraintSet android:id="@+id/viewsInvisible">
<Constraint android:id="@+id/loading">
<Layout
android:layout_width="64dp"
android:layout_height="64dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- Must be specified if scale is = 0 -->
<PropertySet android:visibility="invisible" />
<Transform
android:scaleX="0"
android:scaleY="0" />
</Constraint>
<!-- Only change scale and visibliity -->
<ConstraintSet
android:id="@+id/loadingVisible"
app:deriveConstraintsFrom="@id/viewsInvisible">
<Constraint android:id="@id/loading">
<PropertySet android:visibility="visible" />
<Transform
android:scaleX="1"
android:scaleY="1" />
</Constraint>
</ConstraintSet>
</MotionScene>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment