Top "Back-stack" questions

"Back stack" is a stack in which activities within an Android task are arranged.

How to handle back button using view pager?

I am having two fragments Frag A and Frag B which are rendered using view pager . If user has swiped …

android android-viewpager back-stack
Android Fragment null object mNextAnim Internal Crash

Users of the app I am working on have a crashing issue. This is the stack trace I get from …

java android android-fragments android-studio back-stack
Stop fragment from being recreated after resume?

I am using several fragments to be dynamically added into activity. Everything works fine, when I press back-button, the fragments …

android android-fragments onresume back-stack
Using backstack and back button in viewpager

I'm using a viewpager to swipe between fragments and would like the back button to navigate to the previously viewed …

android android-fragments android-viewpager back-stack
Back button closing app even when using FragmentTransaction.addToBackStack()

None of the other questions I have read on stackoverflow have been able to help with my problem. As far …

android android-fragments back-button back-stack
Clearing the full Android activity stack on older SDKs (that lack FLAG_ACTIVITY_CLEAR_TASK)

I've done qui a bit of reading and searching on SO, but can't find a way to clear the current …

android android-intent android-activity back-stack
How to clear fragmentManager back stack without poping fragments?

Simple question but seems impossible to answer... How to clear fragmentManager back stack without poping fragments? I understand it like …

android fragment back-stack fragmentmanager
noHistory vs finish() - Which is preferred?

I don't want my application to show few Activity (say SplashScreenActivity) when pressing back button. So I've used noHistory=true …

android back-stack activity-stack
How to remove previous back stack entry from FragmentManager?

I have an activity in which I am switching fragments using following method: public void setCurrentFragment(Fragment fragment) { FragmentTransaction transaction = …

android android-fragments back-stack fragmentmanager
Navigating back to FragmentPagerAdapter -> fragments are empty

I have a Fragment (I'll call it pagerFragment) that is added to the backstack and is visible. It holds a …

android android-fragments android-viewpager fragmentpageradapter back-stack