Gurupreet / ComposeCookBook

A Collection on all Jetpack compose UI elements, Layouts, Widgets and Demo screens to see it's potential
MIT License
6.3k stars 799 forks source link

Refactor AnimationDefinitions and AnimationScreen #11

Closed amaurymedeiros closed 4 years ago

amaurymedeiros commented 4 years ago

Make the following changes to make the most out of the transition animations defined in the project and to better display them in the animation preview:

1) Renamed AnimationDefinations -> AnimationDefinitions. 2) Changed transition definitions state type from Int to AnimationState. 3) Set the label property to PropKeys so they can be identified in the animation preview. 4) Changed a few var to val.

Here is how DpMultiStateAnimation would be displayed in Android Studio Animation Preview after the changes above:

image

Gurupreet commented 4 years ago

I have lots of cleanups to do in old code as I am still trying out new things. Thank for help 💯