Description
An Easy to use library for managing individual fragment back stack as Instagram and Youtube does.
Easily pluggable with client code, not much code change needed.
To implement, client needs to implement StackableFragment of com.fragstack.contracts package on all fragments who wants to have their own backstack.
Client needs to provide a unique name in getFragmentName() method.
fragstack alternatives and similar packages
Based on the "Navigation" category.
Alternatively, view fragstack alternatives based on common mentions on social networks and blogs.
-
SlidingTutorial
Android Library for making animated tutorials inside your app -
Bubble Navigation
๐ [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of ๐จ customization option. -
Compose Destinations
Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate. -
FragNav
An Android library for managing multiple stacks of fragments -
RecyclerTabLayout
An efficient TabLayout library implemented with RecyclerView. -
Duo Navigation Drawer
A flexible, easy to use, unique drawer library for your Android project. -
AnimatedBottomBar
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges. -
BubbleTabBar
BubbleTabBar is a bottom navigation bar with customizable bubble-like tabs -
Alligator
Alligator is a modern Android navigation library that will help to organize your navigation code in clean and testable way. -
Compose Navigation Reimagined
๐ Type-safe navigation library for Jetpack Compose -
Fragula 2
๐ง Fragula is a swipe-to-dismiss extension for navigation component library for Android -
PagerSlidingTabStrip
An interactive indicator to navigate between the different pages of a ViewPager -
Okuki
Okuki is a simple, hierarchical navigation bus and back stack for Android, with optional Rx bindings, and Toothpick DI integration. -
Dual-color-Polyline-Animation
This library will help to show the polyline in dual color similar as Uber. -
Keyboard Dismisser
Dismiss your keyboard by tapping anywhere outside it. -
TypedNavigation
A lightweight library to help you navigate in compose with well typed functions. -
Facilis
A sleek, out of the box, easy to understand and use, swipe gesture based Navigational Library for android. -
what3words Autosuggest EditText
An Android library to use what3words autosuggest -
AndroidBriefActions
Android library for sending and observing non persistent actions such as showing a message; nice readable way to call navigation actions from ViewModel or Activity/Fragment.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of fragstack or a related project?
README
fragstack : Android library for managing individual fragment backstack.
An Easy to use library for managing individual fragment back stack as Instagram and Youtube does. Easily pluggable with client code, not much code change needed.
To implement, client needs to implement StackableFragment of com.fragstack.contracts package on all fragments who wants to have their own backstack. Client needs to provide a unique name in getFragmentName() method.
Example :
Download via gradle
Step 1. Add the specific repository to your build file:
repositories {
maven {
url "https://jitpack.io"
}
}
Step 2. Add the dependency in your build file (do not forget to specify the correct qualifier, usually "aar"):
dependencies {
compile 'com.github.abhishesh-srivastava:fragstack:' + $latest.version
}
Integration with BottomBar
If there are 4 tabs in BottomBar and each tab corresponds to different fragment and want to have individual stacks. Client should implement StackableFragment and provide implementation for getFragmentName() and onFragmentScroll() method.
Initialization inside onCreate() method of activity
mFragmentController = new FragmentController(getSupportFragmentManager(), R.id.frame_container, savedInstanceState, null);
here R.id.frame_container corresponds to id's on which fragments view are added/replaced.
To display a fragment, call
FragmentTransactionOptions fragmentTransactionOptions = new FragmentTransactionOptions.Builder()
.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out).build();
mFragmentController.displayFragment(fragment, fragmentTransactionOptions); // its not necessary to provide FragmentTransactionOptions, pass null if animation, transition or shared element animations are not required
Back Press Handling :
public void onBackPressed() {
if (!mFragmentController.popBackStackImmediate())
super.onBackPressed();
}