android - Navigation with fragments in navigation drawer -


let me describe situtation : have activity has navigation drawer has items a, b, c, d, s(preferencesfragment). user goes app can choose whatever wants. lets click on b opens new fragmentb has list of items. clicking on item opens new fragmentdetails , puts transaction of fragments stack enable user go fragmentb list.
let user still on fragmentdetails, if chooses go fragments nav. drawer stack empty. there way how let stack forget remaining transactions ? dont mean popbackstack, becouse result small amont of time showing fragmentb.

how achive kind of navigation ?

lupajz, please take time consider on fragments user have access navigation drawer. of time when reach "item details" fragment may wan't offer different kind of navigation.

what want achieve can done using line:

getsupportfragmentmanager().popbackstackimmediate(null, fragmentmanager.pop_back_stack_inclusive); 

nevertheless please take @ following blog posts i've written covering issues:

https://aarcoraci.wordpress.com/2017/02/13/android-tutorial-drawer-and-fragment-navigation-made-easyier/

https://aarcoraci.wordpress.com/2017/02/14/android-drawer-and-fragment-navigation-a-more-real-life-scenario/


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -