android - Show and Hide action bar buttons outside onPrepareOptionsMenu -


in overrided public boolean onprepareoptionsmenu(menu menu) can hide or show menu buttons adding true or false in way

menu.finditem(r.id.my_action_button).setvisible(true); 

but need same operation when different method inside activity called,

how this?

call:

    activity.invalidateoptionsmenu(); 

Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -