Hello all :wave: Quick question does the navigati...
# android
g
Hello all đŸ‘‹ Quick question does the navigation component support shared element transitions from fragment to a second activity?
i
You'd want one section down for shared elements with an activity (https://developer.android.com/guide/navigation/navigation-animate-transitions#set-activity), but yeah, that's the right page :-)
g
Hm, have tried that way and it only fades in and out instead of moving my element on the correct position but might be a problem of timing and i need to postpone and start animations that way?
b
g
Are those hosted on different activities? I am from my mobile currently and it’s difficult to tell.
b
ah, no single activity, fragment -> fragment. But the idea should be the same in theory.
g
It’s not unfortunately. I have successfully done that. But as we are migrating to nav component we have to keep some activities for the time being. So what i have now is a fragment in Activity A and then i want one element of that fragment to be transitioned to Activity B. I tried the above solutions but they only fade in/out. But i am wondering maybe it’s a timing issue.
i
You did read the other doc that was linked to in that documentation? There's other things you need to do at the activity level to set your shared element transition, set transition names, etc: https://developer.android.com/training/transitions/start-activity#start-with-element
The Navigation APIs are just the tip of the iceberg