Code
Metaphor: Material Motion animations

Metaphor is the library to easily add Material Motion animations.
Metaphor provides support for all four motion patterns defined in the Material spec.
Example – Container transform:
//Start Fragments onclick// val extras = FragmentNavigatorExtras(view to item.pos.toString()) val action = ArtistListFragmentDirections.navToCharacterDetailFragment(item) findNavController().navigate(action, extras) //start fragment metaphorStartFragmentMaterialContainerTransform(view)// inside on onviewcreated ////it also retuns the object of MaterialContainerTransform() you can use .apply { } to change values //destination fragment metaphorDestinationFragmentMaterialContainerTransform(view, args.data.pos.toString())// inside onviewcreated ////it also retuns the object of MaterialContainerTransform() you can use .apply { } to change values
