Chuyển đến nội dung
Skillpedia
Ứng dụng di động10k · #11924

navigation-3

Skill này làm gì

Skill này hướng dẫn cài đặt và chuyển sang Jetpack Navigation 3, thư viện điều hướng mới hơn cho Android. Nó cũng bao quát các mẫu như liên kết sâu, nhiều ngăn xếp quay lại và bottom sheet. Nó dành cho lập trình viên Android đang chuyển sang hoặc xây dựng với Navigation 3.

Khi nào nên dùng

  • ✓Khi bạn muốn chuyển ứng dụng Android từ Navigation 2 sang Navigation 3.
  • ✓Khi bạn cần nhiều ngăn xếp quay lại, chẳng hạn các tab riêng với lịch sử riêng.
  • ✓Khi bạn muốn liên kết sâu, hộp thoại hoặc bottom sheet được xử lý qua điều hướng.

Liên kết skill

https://github.com/android/skills/blob/main/navigation/navigation-3/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/android/skills/blob/main/navigation/navigation-3/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Chuyển ứng dụng Android của tôi từ Navigation 2 sang Navigation 3 và giữ các màn hình hoạt động như cũ.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill làm theo hướng dẫn chuyển đổi, bao gồm cập nhật phụ thuộc, thay đổi route và xử lý trạng thái. Sau đó nó chỉ cách thiết lập các mẫu như liên kết sâu, scene và kết quả trả về từ các luồng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.


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

Câu hỏi thường gặp

Nó có bao quát việc chuyển từ route dạng chuỗi không?

Có. Nó chỉ tới một hướng dẫn về điều hướng kiểu an toàn trong Compose như một phần của việc chuyển đổi.

Nó có giúp với luồng đã đăng nhập và chưa đăng nhập không?

Có. Nó bao quát điều hướng có điều kiện, chẳng hạn hiển thị các màn hình khác nhau cho người dùng đã đăng nhập và người dùng ẩn danh.

Nó có bao quát Hilt và ViewModel không?

Có. Nó bao gồm tích hợp với Hilt, ViewModel và Kotlin.

Chi tiết

Mô tả gốc của tác giả

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.

repo: android/skills

Độ phổ biến

Sao GitHub
10k
Vị trí xếp hạng
#11924
Giấy phép
Apache-2.0
Cập nhật
29/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự