Android: How to enable/disable option menu item on button click?
I can easily do it when I am using onCreateOptionsMenu or onOptionsItemSelected methods. But I have a button somewhere in screen, and on clicking that button, it should enable/disable context menu items. Vikas Anyway, the documentation covers all the things. Changing menu items at runtime Once the activity is created, the onCreateOptionsMenu() method is called only once, as described above. The system keeps and re-uses the Menu you define in this method until your activity is destroyed. If you want to change the Options Menu any time after it's first created, you must override the