Friday, March 15, 2019

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 handling up and back
- Default behaviors for animations and transitions
- Deep linking, including proper backstack generation
- Implementing common patterns like navigation drawers and bottom nav with little additional work using the Navigation UI library →
- Type safety when passing information while navigating using the Safe Args plugin →

To learn more about Navigation, check out:

- The Navigation Component Documentation →
- Navigation Codelab →
- Single Activity: Why, When, and How at Android Dev Summit '18 →
- Android Studio 3.3 Blogpost →
- Base Navigation Reference Documentation →
- Fragment navigation Reference Documentation →
- Navigation UI Reference Documentation →
- Source code (part of AOSP) →
- Navigation Editor Issue Tracker →
- Navigation Component Issue Tracker (Non Navigation Editor) →