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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

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

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -