This is a simple Jetpack Navigation 3 demo showcasing a clean navigation setup with multiple NavDisplays and a bottom bar layout.
It demonstrates how to structure navigation across different parts of an app — from authentication to the main content area — using modern best practices.
The app simulates a small application with two main navigation layers:
- Root NavDisplay — handles the login flow.
- Main NavDisplay — contains a bottom navigation bar with two sections: Tasks and Settings.
- The entry point of the app.
- Contains a single Login button that navigates to the main app area.
- Serves as the root NavDisplay for authentication.
After login, the user is taken to the main app screen which includes:
- A bottom bar with two tabs:
- Tasks
- Settings
This main section is controlled by its own NavDisplay, separate from the root navigation.
- Displays a simple in-memory list of tasks managed by a ViewModel.
- Each task can be marked as completed.
- Supports navigation to a Task Details screen with a smooth horizontal slide animation.
- Demonstrates how to pass data between destinations and manage UI state using a shared ViewModel.
- Shows details of the selected task.
- Includes a back button to return to the list.
- Contains only a simple text element (for demo purposes).
- Exists to show how multiple destinations can coexist under a bottom navigation setup.
- Highlights the flexibility of Navigation 3 when using multiple
NavDisplays.
- Multi-layer navigation using two NavDisplays
- One for login (root)
- One for the bottom bar (main content)
- Integration of bottom navigation with Navigation 3
- Smooth transition animations between destinations
- Basic state management with ViewModel
- Simple and clear navigation structure ideal for scaling to larger apps
This project was built to help Android developers understand how to:
- Organize navigation hierarchies in modern apps
- Use multiple
NavDisplayseffectively - Keep navigation logic modular and maintainable
If you're exploring Navigation 3, this demo provides a clear, minimal example of real-world structure and behavior.
- Kotlin
- Jetpack Compose
- Navigation 3
- ViewModel (AndroidX Lifecycle)
- Material 3
- Clone the repository:
git clone https://github.com/<your-username>/navigation3-demo.git
- Open the project in Android Studio Jellyfish (or newer).
- Sync Gradle and run the app on an emulator or device.
This project is released under the MIT License.
You’re free to use it as a reference, fork it, or adapt it for your own projects.
If you found this useful, leave a ⭐ on the repo and check out the upcoming Medium article about this demo!