Agent Skillsandroid/skills › navigation-3

navigation-3

GitHub

提供Jetpack Navigation 3的安装、迁移指南及核心功能实现,涵盖深层链接、多返回栈、场景布局及与Hilt/ViewModel集成等开发模式。

navigation/navigation-3/SKILL.md android/skills

Trigger Scenarios

Android应用导航架构升级 Jetpack Navigation 3迁移 实现深层链接或复杂UI导航

Install

npx skills add android/skills --skill navigation-3 -g -y
More Options

Non-standard path

npx skills add https://github.com/android/skills/tree/main/navigation/navigation-3 -g -y

Use without installing

npx skills use android/skills@navigation-3

指定 Agent (Claude Code)

npx skills add android/skills --skill navigation-3 -a claude-code -g -y

安装 repo 全部 skill

npx skills add android/skills --all -g -y

预览 repo 内 skill

npx skills add android/skills --list

SKILL.md

Frontmatter
{
    "name": "navigation-3",
    "license": "Complete terms in LICENSE.txt",
    "metadata": {
        "author": "Google LLC",
        "keywords": [
            "recipe",
            "Android",
            "Navigation 2",
            "Navigation 3",
            "migration",
            "Compose",
            "guide",
            "dependencies",
            "NavKey",
            "NavHost",
            "NavDisplay",
            "BottomSheet",
            "list-detail",
            "scenes",
            "two-pane",
            "supporting pane",
            "multiple backstacks",
            "dialog",
            "Hilt",
            "ViewModel",
            "View interop."
        ],
        "last-updated": "2026-08-06"
    },
    "description": "Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep links, multiple backstacks, scenes (dialogs, bottom sheets, list-detail, two-pane, supporting pane), conditional navigation (such as logged-in navigation versus anonymous), returning results from flows, integration with Hilt, ViewModel, Kotlin, and view interoperability."
}

Migration guide

  • Navigation 2 to Navigation 3 migration guide: Step-by-step guide to migrate an Android application from Navigation 2 to Navigation 3, covering dependency updates, route changes, state management, and UI component replacements.

Requirements

Developer documentation

  • Navigation 3. Search documentation for more information on basics, saving and managing navigation state, modularizing navigation code, creating custom layouts using Scenes, animating between destinations, or applying logic or wrappers to destinations.

Recipes

Code examples showcasing common patterns.

Basic API usage

Common UI

  • Common UI: Demonstrates how to implement a common navigation UI pattern with a bottom navigation bar and multiple back stacks, where each tab in the navigation bar has its own navigation history.

Deep links

Scenes

Use built-in Scenes

  • Dialog: Shows how to create a Dialog.

Create custom Scenes

  • BottomSheet: Shows how to create a BottomSheet destination.
  • List-Detail Scene: Demonstrates how to implement adaptive list-detail layouts using the Navigation 3 Scenes API.
  • Two pane Scene: Demonstrates how to implement adaptive two-pane layouts using the Navigation 3 Scenes API.

Material Adaptive

  • Material List-Detail: Demonstrates how to implement an adaptive list-detail layout using Material 3 Adaptive.
  • Material Supporting Pane: Demonstrates how to implement an adaptive supporting pane layout using Material 3 Adaptive.

Animations

  • Animations: Shows how to override the default animations for all destinations and a single destination.
  • Conditional Transitions: Shows how to implement conditional transition animations.

Common back stack behavior

  • Multiple back stacks: Shows how to create multiple top level routes, each with its own back stack. Top level routes are displayed in a navigation bar allowing users to switch between them. State is retained for each top level route, and the navigation state persists config changes and process death.

Conditional navigation

  • Conditional navigation: Switch to a different navigation flow when a condition is met. For example, for authentication or first-time user onboarding.

Lifecycle

Architecture

Working with ViewModel

Passing navigation arguments

  • Basic ViewModel : Navigation arguments are passed to a ViewModel constructed using viewModel()

Returning results

Version History

  • 6685cac Current 2026-08-19 22:25
  • 47e1dff 2026-07-24 22:27

Same Skill Collection

build-system/agp/agp-9-upgrade/SKILL.md
camera/camerax/SKILL.md
device-ai/appfunctions/SKILL.md
devtools/android-cli/SKILL.md
identity/verified-email/SKILL.md
jetpack-compose/migration/migrate-xml-views-to-jetpack-compose/SKILL.md
jetpack-compose/theming/styles/SKILL.md
media/media3-cast-integration/SKILL.md
performance/r8-analyzer/SKILL.md
play/engage-sdk-integration/SKILL.md
play/play-billing-library-version-upgrade/SKILL.md
play/play-policy-insights/SKILL.md
profilers/android-profiler/SKILL.md
profilers/perfetto-sql/SKILL.md
profilers/perfetto-trace-analysis/SKILL.md
security/android-intent-security/SKILL.md
system/edge-to-edge/SKILL.md
testing/testing-setup/SKILL.md
wear/wear-compose-m3/SKILL.md
xr/display-glasses-with-jetpack-compose-glimmer/SKILL.md
jetpack-compose/adaptive/SKILL.md
tv/leanback-to-compose-tv-migration/SKILL.md

Metadata

Files
0
Version
6685cac
Hash
03471d79
Indexed
2026-07-24 22:27

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 19:08
浙ICP备14020137号-1 $방문자$