skydoves / TransformationLayout

🌠 Transform between two Views, Activities, and Fragments, or a View to a Fragment with container transform animations for Android.
Apache License 2.0
2.35k stars 190 forks source link

Navigation UI #4

Closed ebekerman closed 3 years ago

ebekerman commented 4 years ago

Does it work with Navigation Component?

skydoves commented 4 years ago

Hi, @ebekerman sorry for the late reply. Here is the navigation solution.

You can replace the getBundle and addTransformation section using below codes.

// Map the start View in FragmentA and the transitionName of the end View in FragmentB
val extras = FragmentNavigatorExtras(view to "TransformationParams")
findNavController().navigate(R.id.action_fragmentA_to_fragmentB, null, null, extras)

And the other settings are the same.