← 返回
未分类 中文

Navigation 3

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...
学习如何安装并迁移到 Jetpack Navigation 3,以及实现深度链接、多个返回栈、场景(如对话框...)等功能和模式。
ntriq-gh
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 391
下载
💾 1
安装
1
版本
#latest

概述

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

  • Basic: Shows how to parse a deep link URL from an Android Intent into a navigation key.
  • Advanced: Shows how to handle deep links with a synthetic back stack and correct "Up" navigation behavior.

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.

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.

Architecture

Working with ViewModel

Passing navigation arguments

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

Returning results

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 08:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Ntriq X402 Compliance Check Batch

ntriq-gh
批量合规分析,最多500条文本,固定费用9.00 USDC,x402支付。
★ 0 📥 364

Ntriq X402 Audio Intel

ntriq-gh
AI音频转录——将mp3/wav/m4a/ogg转为文字,支持语言自动识别和时间戳。费用 $0.05 USDC via x402。
★ 0 📥 367

Edge To Edge

ntriq-gh
使用此技能将 Jetpack Compose 应用迁移至自适应全屏支持并排查常见问题。使用此技能修复 UI 组件(…)
★ 0 📥 387