Navigation Component Crash Course – Android Kotlin Tutorial

Navigating between fragments and activities in Android can sometimes be confusing. Not to mention the amount of error-prone boilerplate code you have to write. While Kotlin simplifies a lot of things when it comes to fragment transactions and starting activities, there’s still a lot of room for improvement.

Navigation Architecture Component libraries will help you solve your complex navigation demands. They let you skip fragment transactions by abstracting it in the form of simple to use navigation destinations. You can set up these destinations in a friendly-looking drag and drop editor.

Navigation Architecture Components support easy way of deep-linking into a specific place in your app and they manage the back-stack for you. With these libraries you can even pass arguments between activities or fragments in a type-safe way.

?Get the code from this tutorial?


Matej Rešetár

Matej is an app developer with a knack for teaching others. If he's not programming, making tutorials or doing other business, he's mostly working out, listening to audiobooks and taking cold showers.

  • Faisal Mushtaq says:

    i tried this but when i click on bottom nav menu, its doesnt change the fragment. I checked the code multiple times but in vain. can you help please

  • >