Android Jetpack: Introducing Navigation Component



The Navigation component is a suite of libraries, tooling and guidance for in-app navigation. The component centralizes all of the navigation information of your app in a navigation graph, providing a robust framework for implementing everything from simple button clicks to complex navigation UI patterns.

Android Studio 3.3 includes the Navigation Editor, which visuals your navigation graph. Other features and benefits include:

– Automatic handling of fragment transactions
– Correctly…

28 Comments

  1. How to find out what the previous fragment was using the navigation?
    the previous fragment in navigation control I need to know, which fragment is my previous fragment when 3 fragments navigate to a fragment?

  2. How can I move from number 3 position to number 1 position in bottom navigation with correct fragment in nav controller programmatically in kotlin?

  3. It is years late but a good start. Still more work is needed to make is simpler. This navigation should be build-in and not require mess of additional libraries.

  4. What is the solution for onActivityResult() in this architecture..?

  5. why don't you ppl create best practice videos with simple examples. We always have to relay on complex docs or wait for youtube videos.

  6. How do I add animation transitions to a set of fragments where it is a 1 to many relationship? My list of fragments is part of a menu drawer layout and any fragment could be the destination depending on selection.

  7. can you stop using kotlin as default? Most people use Java, and Kotlin users understand java, but not the other way around

  8. This is amazing! And explained very nicely, thanks!

  9. @Android Developers Please provide a Java codelab for this Navigation framework. There is only a Kotlin one and many of us are coding in Java.

  10. One thing I liked and hated about iOS development was interface builder glad to see Android is implementing something similar

  11. Looking at this I can't help but compare it to JavaFX Scene builder, or Swing JFrame builder, one thing in common, not suitable for large projects but awesome prototyping tool.

  12. Migrating legacy code consisting of fragments is going to be a bit time consuming. But navigation component has made structuring the app a bit easy as compared to before.

  13. Guys, I have been dealing with an issue(a requirement though) where the transaction type is replace by default. But, I need to do an add transaction to the fragments in nav graph. How can I achieve that ?

  14. Very simple and easy to follow.
    When working with the bottom navigation how do you pressing back always goes back to the start destination which may not be the destination the regardless of the previous destination. How do you handle this?

  15. longly wanted, I programed own Navigation component that used reflection property of Java. Worked perfectly, Used it in much client projects. interesting that so much years gone before google did it

Leave a Reply

Your email address will not be published. Required fields are marked *