fragment-backstack Questions

3

Solved

I have simple code below FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(R.id.frag...
Carboxylate asked 21/4, 2015 at 20:46

8

Solved

I'm new to the Android Jetpack Navigation architecture. I'm trying it out on a new app. There's one activity and a few fragments, two of them are login screen and email login screen. I defined thos...

0

As I observed it seems that the fragment backstack is not retained after process death. So if I kill my app by putting it to background and call am kill <app> it does not recreate the fragmen...
Westbound asked 15/4, 2021 at 12:2

10

Solved

I am working on fragment transaction, and the backstack is like this: fragA => fragB => fragC => fragD I would like to return to fragA after back fromn the fragD fragD => onBackPres...

2

Solved

I have a single activity app, with three fragments, A, B, C. In the normal app flow, fragments are opened in sequence: A->B->C I have a foreground service with a notification that when clicked, sh...

7

Solved

I'm using the Android Compatibility library to implement fragments and have extended the layout sample so that a fragment contains a button which fires off another fragment. In the selection pane ...
Azeotrope asked 27/4, 2011 at 9:45

2

Solved

Everytime fragment instance is created and reloading when you press back. How to overcome this issue? Inability of having proper backstack in nav controller is a huge productivity issue. Hope it'...

1

Solved

I'm having a problem where when executing findNavController(R.id.main_nav_host).navigateUp() or findNavController(R.id.main_nav_host).popBackStack() Instead of going back to the last fragment...

5

Solved

I'm implementing BottomNavigationView for navigation in an Android app. I am using Fragments to set the content for each tab. I know how to set up one fragment for each tab and then switch fragmen...

5

I have a problem about removing a specific fragment from back stack.My scenario is like this.Fragment-1 is replaced with Fragment-2 and then Fragment-2 is replaced with Fragment-3. Calling order; ...
Patroclus asked 3/7, 2015 at 5:7

3

I'm developing a simple fragment-based application with a singe FragmentActivity. Each 'screen' of the application is contained in a fragment and all fragments are added to the container layout at ...
Adriel asked 26/9, 2012 at 20:42

2

Solved

I have created an AppCompatActivity Opened fragment A->B->C->D->E->F with replace() I am on F which contain button when I press the button I want to clear Fragments up to C and Want to open G on ...
Uranalysis asked 22/2, 2018 at 11:37

0

I have a single Activity with fragments and two simple methods inside the activity for managing fragments: pushFragmentImmediate() and popFragmentImmediate(). public void pushFragmentImmediate(Fra...

1

I am trying to retrieve the fragment from the backstack. It is getting retrieved but the issue is that on pressing the back button the oncreate view and subsequent lifecyce methods of current fragm...

3

Solved

I'm scratching my head with this one now.... I have an ActionBarActivity that loads an initial Fragment - the original menu is inflated within the activity. Now, I have a navigation bar that, when ...

1

Solved

In setCustomAnimations() it takes four resource id for the animation. Not really understand them. If someone having clearer picture of it it would be appreciated if you could explain. Let's say hav...
Partizan asked 30/11, 2016 at 1:36

2

I've added custom keyboard to my Fragment and now I want to implement closing keyboard when on back pressed. class CustomKeyboard { public void init(Context context) { //... FragmentManager fr...
Renault asked 25/9, 2016 at 19:18

6

Solved

am creating multiple fragment app, which require easy changing of fragment tabs, whose BackStack entry must be kept. On user click fragment must be pop up immediate. I think reordering BackStack is...

7

Solved

I have used multiple Fragments in my Project. I want to save a Fragment's state and restore this state when I come back to this. In this Fragment I show multiple images which change on button click...
Clydeclydebank asked 6/9, 2016 at 7:33

4

Solved

I want to get the last fragment in the backstack, or the current displayed it's the same for me, in the tab b_1. As you can see in the following image, I have a ViewPager, and another one inner tab...

3

I have two fragments FragmentHome and FragmentAbout, I have added NavigationDrawer to app when I click Home it opens FragmentHome and About opens FragmentAbout, when I open FragmentAbout I am also ...

2

Solved

I am doing a NavigationDrawer based application. I have an hierarchy like given below NavigationDrawer --> RootFragment(Not added to back Stack) --> Detail Fragment (Added to Back Stack) Now,...

2

Solved

I have an Activity with three Fragments lets call them A, B and C. Fragment A is called in the Activity onCreate(). FragmentA fragA = new FragmentA(); FragmentTransaction transaction = manager.be...

1

Solved

I'm using a TabLayout in one of my fragments with a viewPager to switch between two fragments below the tabs. When I click the FAB inside one of the lower fragments, I load a new fragment (f...
1

© 2022 - 2024 — McMap. All rights reserved.