Top "Fragment-backstack" questions

Akin to the Android Activity backstack, the Fragment backstack is a task-like stack of Fragments (specified when adding a Fragment to a page with FragmentManager).

Is this the right way to clean-up Fragment back stack when leaving a deeply nested stack?

I'm using the Android Compatibility library to implement fragments and have extended the layout sample so that a fragment contains …

android android-fragments fragment-backstack
What does FragmentManager and FragmentTransaction exactly do?

I have simple code below FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(R.id.fragment_container, mFeedFragment); fragmentTransaction.…

android fragmenttransaction fragmentmanager fragment-backstack
How to delete a specific fragment from back stack in android

I have a problem about removing a specific fragment from back stack.My scenario is like this.Fragment-1 is replaced …

android android-fragments fragment fragment-backstack
How to get the current fragment displayed in a specific tab of a viewpager?

I want to get the last fragment in the backstack, or the current displayed it's the same for me, in …

android android-fragments android-viewpager fragment-backstack
PopBackStack but keep the first fragment in android

I am working on fragment transaction, and the backstack is like this: fragA => fragB => fragC => fragD I …

android android-fragments android-fragmentactivity back-stack fragment-backstack
Navigation popUpTo and PopUpToInclusive aren't clearing the backstack

I'm new to the Android Jetpack Navigation architecture. I'm trying it out on a new app. There's one activity and …

android kotlin navigation android-jetpack fragment-backstack
Back navigation with Fragments / Toolbar

I'm scratching my head with this one now.... I have an ActionBarActivity that loads an initial Fragment - the original …

android fragment android-toolbar android-actionbaractivity fragment-backstack
Separate Back Stack for each tab in BottomNavigationView Android using Fragments

I'm implementing BottomNavigationView for navigation in an Android app. I am using Fragments to set the content for each tab. …

android android-fragments bottomnavigationview fragment-backstack
Fragments BackStack. Fragments overlap even after pop.

The problem is to manage properly back stack so the previous fragment is poped out (or deleted). The problem is …

android android-fragments overlapping fragment-backstack
FragmentTransaction::replace() with or without addToBackStack()

Having a flow to add fragment and later replace() fragment. All fragment are dynamically added, but not all call addToBackStack(). …

android android-fragments fragment-backstack