I have a custom menu options that I want to disable it from popping up if a button on screen is clicked..
I thought of using this code but it doesnt work:
@Override
public boolean onPrepareOptionsMenu (Menu menu) {
if (Schedule)
menu.getItem(1).setVisible(View.GONE);
return true;
}
Is there a way to prevent the menu button from doing anything? Thanks.