Android: Multiple Option Menus in one Activity
问题 I have an Activity containing a ViewFlipper and would like to show a different option menu for each view in that ViewFlipper . That is, the type of menu displayed when the menu button is pressed would depend on the type of the current view. However, onCreateOptionsMenu() is called only once (when showing the option menu for the first time), so creating the different menus can't be implemented there. How could I solve this? Any suggestions appreciated. 回答1: First read about