Metaphor — библиотека для простого добавления Material Motion анимаций. Реализует четыре их вида: Container transform, Shared axis, Fade through и Fade.
Пример использования:
//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