Top "Back-stack" questions

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

Programmatically go back to the previous fragment in the backstack

Say I have an activity that has fragments added programmatically: private void animateToFragment(Fragment newFragment, String tag) { FragmentTransaction ft = getFragmentManager().…

android android-fragments back-stack
Fragment onResume() & onPause() is not called on backstack

I have multiple fragment inside an activity. On a button click I am starting a new fragment, adding it to …

android android-fragments onresume back-stack
Clear the entire history stack and start a new activity on Android

Is it possible to start an activity on the stack, clearing the entire history before it? The situation I have …

android android-activity back-stack
How to resume Fragment from BackStack if exists

I am learning how to use fragments. I have three instances of Fragment that are initialized at the top of …

android android-fragments back-stack
How to prevent going back to the previous activity?

When the BACK button is pressed on the phone, I want to prevent a specific activity from returning to its …

android back back-stack activity-stack
How can I maintain fragment state when added to the back stack?

I've written up a dummy activity that switches between two fragments. When you go from FragmentA to FragmentB, FragmentA gets …

android android-fragments back-stack
Android: Remove all the previous activities from the back stack

When i am clicking on Logout button in my Profile Activity i want to take user to Login page, where …

android back-stack
Problems with Android Fragment back stack

I've got a massive problem with the way the android fragment backstack seems to work and would be most grateful …

android android-fragments back-stack
Android - save/restore fragment state

I have an Activity in which I go through several fragments. In every fragment I have several views (EditText, ListView, …

android android-fragments fragment onresume back-stack
get the latest fragment in backstack

How can I get the latest fragment instance added in backstack (if I do not know the fragment tag & …

android android-fragments back-stack