last day (15 days later) » 

3:40 PM
0
Q: Navigation with fragments in navigation drawer

XOOLOOOLet me describe situtation : I have activity that has navigation drawer that has items A, B, C, D, S(PreferencesFragment). Now as user goes into app he can choose whatever he wants. Lets say he click on B this opens new fragmentB that has list of some items. Clicking on item opens new fragmentDe...

 
don't add the fragment to the back stack. don't so ft.addtobackstack(null)
 
but I want user to be able to go from fragmentDetails to fragmentB with back button
 
so what is that you want. Its not clear
FragmentB --> DetailsFragment. DetailsFragment back button. FragmentB. Now FragmentB--> FragmentS. don't add the fragment to the backstack at this point if i understand your problem rightly
 
okay I dont do that like you described ... but FragmentB->Details transaction goes to backstack. from Details->fragmentS(from drawer), from fragmentS to fragmentB via drawer again and transaction is in backstackk still ... this is what I mean
 
fragmentS to fragmentB Don't add the fragment to the backstack now.
 
3:40 PM
I dont ! I only add fragments to backstack if from fragmentB->Details I never use addtobackstack method to keep track of transactions
 
i still don't understand your requirement and what you want
 
okay ... thanks for your time
 
i am lost
 
okay give me a second
I have drawer with entries in it A,B,C and S for preferences fragment. User selects B this opens fragmentB with clickable list
as user clicks on item it opens fragmentDetails of that item
 
37
Q: Clear back stack using fragments

biquilloI ported my Android app to honeycomb and I did a big refactor in order to use fragments. In my previous version, when I pressed the Home button I used to do a ACTIVITY_CLEAR_TOP in order to reset the back stack. Now my app is just a single Activity with multiple fragmens, so when I press the Ho...

 
3:43 PM
this transaction is added to backstack as I want user to be able to navigate back by popBackStack method call :) this works
okay let me show you the code :D
github.com/lupajz/bc/blob/master/app/src/com/kulturnepodujatia/… here is the main activity with navigation drawer
 
check the link posted. That is what you want.
 
atm I do this for (int i = 0; i < fragmentManager.getBackStackEntryCount(); ++i) { // <velmi zla chyba
fragmentManager.popBackStackImmediate(null,
FragmentManager.POP_BACK_STACK_INCLUSIVE);
// fragmentManager.popBackStack();
} always as user clicks on item from drawer
 
Good luck
 
this is okay
but for a second this opens the fragmentB from example
 

last day (15 days later) »