Is it possible to change the option menu items programmatically? Can anyone provide me with an example please?
Also, I want to disable certain items, so that they do
Like Nikolay said do that in onPrepareOptionsMenu().
For menu items in the action bar you have to invalidate the menu with activity.invalidateOptionsMenu();
activity.invalidateOptionsMenu();
This is descriped in more detail here How can I refresh the ActionBar when onPrepareOptionsMenu switched menu entries?