# navigation-architecture-component

George Theocharis

07/30/2020, 10:33 AM
Hello all 👋 Quick question does the navigation component support shared element transitions from fragment to a second activity?

Brady Aiello

10/10/2020, 9:22 PM
It's not as easy as I'd like to be, but yes. I'm doing it here: Like any SharedElementTransition, the transitionName of each pair of shared elements must be the same, and the transition needs to be set. Then you need to pass the shared elements as FragmentNavigatorExtras to the navigate method. Then you need to postpone the enter animation to the new Fragment until it's been drawn, and then resume the postponed enter animation. Dnd you have to do the same thing when going back, if it's an item in a recycler view. And all this info must be set at the right time. Data binding helped a lot with that. I've had a lot of trouble getting this right. I mean, it works, but it's a pain. I wish Nav Comp SharedElementTransition just worked right out of the box, but there were a lot of hoops to jump through.
And sorry, it's not even exactly the same, because it's Fragment to Fragment, not Fragment to Activity, but the same approach generally applies.