Is there a way to dynamically disable , hide, add/remove menu items in ActionBar ? For example, an action is disabled until user fills a valid phone number in an activity.
I didn’t find any useful methods in ActionBar API, the only way seems to be using a custom View in ActionBar.
To tell ActionBar to refresh its menu items: invalidateOptionsMenu()
then to enable/disable Menu Items:
and to hide the action bar you have: