I have a Navigation drawer in my app. It has a list of items. I use a switch statement and replace a current Fragment with a completely new Fragment which has its own views and logic.
My problem is that each Fragment has its own menu item in the action bar. I don't know how to change the actionBar menu item according to the selected drawer list item. I have tried lots of tutorials and ended with no result. Some sample code would really help.
Thanks in advance.
I think this tutorial is exactly what you're looking for:
http://www.grokkingandroid.com/adding-action-items-from-within-fragments/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments