RepositoryKotlinUSUnited States
NC

ncapdevi/FragNav

An Android library for managing multiple stacks of fragments

1.5kstars
220forks
35issues
2views

📱 FragNav: Quản lý nhiều stack fragment trên Android

Thư viện Android giúp quản lý nhiều stack fragment — lý tưởng cho Bottom Navigation và Navigation Drawer.

FragNav là thư viện open-source bằng Kotlin giúp quản lý nhiều stack fragment trên Android, phù hợp với các mẫu điều hướng như Bottom Navigation hoặc Navigation Drawer. Thư viện này không cung cấp UI tab bar, mà tập trung vào duy trì thứ tự fragment khi chuyển đổi giữa các tab, đẩy hoặc lấy fragment.

✨ Điểm nổi bật

  • Quản lý nhiều stack: Mỗi tab có một stack fragment riêng, tuân thủ nguyên tắc Android về trạng thái điều hướng.
  • Khởi tạo linh hoạt: Hỗ trợ truyền danh sách fragment hoặc tạo động qua RootFragmentListener.
  • Giao tác đầy đủ: Hỗ trợ chuyển tab, đẩy/lấy fragment, thay thế và xóa stack về fragment gốc.
  • Lưu trạng thái: Tích hợp onSaveInstanceState để duy trì trạng thái khi cấu hình thay đổi.
  • Hỗ trợ DialogFragment: Quản lý hiển thị và xóa DialogFragment cùng fragment chính.
  • Tùy chọn giao dịch: Cung cấp FragNavTransactionOptions để tùy chỉnh hiệu ứng giao dịch.

💡 Vì sao đáng chú ý

FragNav đơn giản hóa việc quản lý fragment trong các ứng dụng có điều hướng dạng tab — nơi mỗi tab là một stack riêng. Thay vì tự xây dựng logic lưu trạng thái và chuyển đổi phức tạp, bạn chỉ cần khởi tạo và gọi các phương thức như switchTab, pushFragment, popFragment. Thư viện áp dụng đúng chuẩn Android về quản lý stack, giúp giảm lỗi và cải thiện trải nghiệm người dùng.


#Android #FragmentNavigation #Kotlin #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryJava
Fueled/flowr

FlowR is a wrapper class around the Fragment Manager.

121
Feb 6, 2026
RepositoryKotlin
mikepenz/AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose Multiplatform environments

4.5k
Nov 15, 2026
RepositoryKotlin
adrielcafe/voyager

🛸 A pragmatic navigation library for Compose Multiplatform

3.1k
Jun 6, 2026
RepositoryKotlin
terrakok/Cicerone

🚦 Cicerone is a lightweight library that makes the navigation in an Android app easy.

2.6k
May 15, 2023
RepositoryKotlin
tunjid/Android-Extensions

An Android library with modules to quickly bootstrap an Android application.

582
Jan 16, 2023
RepositoryKotlin
bennyhuo/TieGuanYin

Activity Builder.

180
Jun 2, 2022
RepositoryJava
Blankj/AndroidUtilCode

:fire: Android developers should collect the following utils(updating).

33.6k
Aug 15, 2024
RepositoryJava
davemorrissey/subsampling-scale-image-view

Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.

8.0k
Apr 22, 2024
RepositoryPowerShell
Surfboardv2ray/batch-fragment-scanner

Batch Test v2ray fragment values to see which one works best on your network.

134
Sep 24, 2024