Navigation Component(Jetpack 的一部分)是处理 in-app navigation 的推荐方式 — 在单 Activity 架构中的 destinations(fragments 或 composables)之间移动。它集中了导航逻辑并处理返回栈、参数和深度链接。
它提供什么
The Navigation Component manages navigation within the app:
→ a NAV GRAPH defines destinations (screens) and the actions (paths) between them
(visually/declaratively — one place to see all navigation)
→ a NavController performs navigation; handles the BACK STACK automatically
→ type-safe ARGUMENT passing (Safe Args); deep linking support
→ Designed for SINGLE-ACTIVITY architecture (one activity, many fragment/composable destinations)
