Apologies for a probably off-topic question, but c...
# android
i
Apologies for a probably off-topic question, but can anyone please point me towards the best practices for navigation in Android? Specifically, I'm wondering whether I should use the Navigation component or not. Also, my understanding is that Fragments are preferred over activities. So when I want to push (sorry, coming from iOS development! 🙂) a new screen, should I start a new
Intent
and host my
NewScreenFragment
in the
NewActivity
? Or is it better to just replace the
CurrentScreenFragment
with
NewScreenFragment
(and add it to back stack) in the
CurrentActivity
and then adjust the action bar (back button, menus etc)? Finally, to top it all off, I want to apply the coordinator pattern on all that so I don't tight couple the flows within Activities/Fragments. Thank you very much in advance!
😶 3
u
Navigation is added in Android studio template So create a new project and select Basic activity It will show a flow of two fragments with latest navigation components in Android
i
Oh! That's a great idea, I'll do that. Thank you very much for the link as well!