I have looked through the questions on stack overflow and can\'t find the solution.
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
MenuInflater i
Try this,
private Menu menu=null;
@Override
public void onCreateOptionsMenu(Menu menu,MenuInflater inflater)
{
inflater.inflate(R.menu.note_menu, menu);
this.menu=menu;
super.onCreateOptionsMenu(menu,inflater);
menu.findItem(R.id.menuChartNoteEdit).setVisible(isdown);
menu.findItem(R.id.menuChartOpenNote).setVisible(isdown);
}
When you want to hide menu at any where, after executing onCreateOptionsMenu()
then just change value for isdown
and repeat this code,
menu.findItem(R.id.menu_settings).setVisible(isdown);
menu.findItem(R.id.menu_save).setVisible(isdown);