Multiple menu creation in one application possible?
I'm trying to create a multip开发者_Python百科le menu create in one application. Is this possible or not? Thanks in Advance.
You can create one menu inside an Activity
. However, you can changing the menu items at runtime, depending on the current state of the activity. To achieve this you should override the onPrepareOptionsMenu()
method. This method is called every time the user opens the menu, so you can recreate the menu every time it becomes visible. Hope this helps.
精彩评论