I am using ActionBarSherlock.
I want to change which ActionBar MenuItems are visible depending on the state of my Activity. (For instance depending on which tab is selected.)
How can I do this?
I am using ActionBarSherlock.
I want to change which ActionBar MenuItems are visible depending on the state of my Activity. (For instance depending on which tab is selected.)
How can I do this?
You can get the ActionMenu within the onCreateOptionsMenu method and store it in your activity and change any item visibility at any time...
You can add all items at the same menu and set it visible or not visible just using:
menu.findItem(R.id.your_item).setVisible(true/false);
in onPrepareOptionsMenu