Questions tagged [fragment-backstack]

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). It allows a linear navigation backwards from the current visible fragment, back through a history of previous fragments in a container until you reach the base fragment.

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). It allows a linear navigation backwards from the current visible fragment, back through a history of previous fragments in a container until you reach the base fragment.

Links

357 questions
0
votes
2 answers

Fragment navigation with a custom backstack hierarchy

I need to create a specific behavior at some point in my app. I use a navigation drawer and I replace fragments in a frame layout. Let's say I have some fragments in the backstack: A -> B -> C. A is one of the root fragments in my app, if the back…
grandouassou
  • 2,500
  • 3
  • 25
  • 60
0
votes
1 answer

How to add view to backstack (android)?

I am currently building an app using the new material design principals. In the app, when the user clicks on a list view item, a panel slides up from bottom of the screen, and houses a fragment. My problem is that when the panel is expanded, and…
Fishingfon
  • 1,034
  • 3
  • 19
  • 33
0
votes
2 answers

how do I restore the last ListFragment from the current Fragment

My app has structure like this MainActivity extends ActionBarActivity -- on button press -> ListFragment --on list item press--> Fragment When in Fragment and if back key is pressed it goes to MainActivity directly . How do I make it to go to…
-1
votes
2 answers

Is there a way to see what fragments are in a FrameLayout?

I have the fragment obj as well as the FrameLayout, I could also complete my logic if I can: Get my fragments containerViewId OR See what FrameLayout a fragment is in?
-1
votes
1 answer

How to delete specific fragment from layout

I have 4 fragment in home layout. I want to remove specific fragment when user press corresponding button. when i am doing this with popBackStack() it deleting recent fragment added by user. so how can i remove specific fragment from screen. I am…
-1
votes
2 answers

Backstack Issue in fragment and activity

Suppose I have total 7 activity say A, B, C, D, E, F, G, in Activity A I have 4 fragments after clicking on 4th fragment I am launching Activity B, Then Activity C, D, E, F .after Coming to Activity F, I want to navigate to 2 fragments of …
-1
votes
3 answers

How to manage fragments in backstack?

I am trying to manage fragments in a very simple way. I have created a utility class that's adding fragments to the backstack and when we press the back button, the previous fragment shows up. I am OK with that. But, when I am trying to clear out…
Hitesh Pamnani
  • 177
  • 3
  • 14
-1
votes
1 answer

Refresh first fragment data

I have One Activity (MainActivity). It have two fragment(NewsTiltleFragment & NewsDetilsFragment). User lanch the app NewsTitleFragment is displayed.When user choose particular news title it shoud navigate NewsDetilsFragment. when user return…
-1
votes
1 answer

proper backstack navigation on pressing Up button

I implemented backstack navigation on Back button in MainActivity (which have many fragments) using onBackPressed(). I want to implement same backstack navigation on Up button press. Problem is I only want Up button in one fragment but the Up button…
-1
votes
1 answer

What happens to a Fragment once it's removed or replaced?

Android documentation doesn't seem to have much on it, other than stating that the fragment is removed once the Transaction is committed. Is the Fragment just gone? Like in a metaphysical sense? Or does it exist somewhere still, able to be called…
velocirabbit
  • 706
  • 7
  • 16
-1
votes
1 answer

illegal argument exception , No View Found for the class fragment

Hi have Menu Drawer in My Main Activity and have 2 Fragment , first Fragment Contain tab bar and second fragment is simple. second fragment simple fragment. when i am on Second fragment and on back stack back press button i pop last fragment at that…
Vasudev Vyas
  • 726
  • 1
  • 10
  • 28
-4
votes
1 answer

popBackStack() works in Fragment but not from Activity

I am simply closing fragment and going back to previous one by getFragmentManager().popBackStack(); And it works, fragment is closed. But when I put the same code in the activity method and call it, then nothing happens. …
1 2 3
23
24