I have two fragments, one a ListView and one a "details" view. Each fragment has it's own menu options. When in landscape mode, where both fragments are displayed, each menu is merged into one (which, I'm assuming is by design), but if I rotate the device to portrait, the menus remain merged, and show options that shouldn't be there. Not sure if I need to include any code in my question.
Edit:
Found this question, but adding menu.clear() only shows the menu options for the details view, when in landscape and changing back to portrait, the menu doesn't change.
I guess the bigger question is how to do you handle fragments, each with the own set of menu options.
Update:
To be clear, the menus work fine if the device is left in portrait or landscape mode. The issue occurs when rotating from landscape to portrait or vice versa. The menus do not seem to reset even though onCreateOptionsMenu
is called.