android - setShowsAsAction not working below API 11 -


this code used remove menuitem:

af.setshowasaction(menuitem.show_as_action_never); 

however, setshowsasaction requires minimum api 11 crashes on gingerbread. can use af.setvisible(false); code work on gingerbread. differences between two? same thing?

use v7 support library followed:

menuitem menuitem = menu.add(....); menuitemcompat.setshowasaction(menuitem , menuitemcompat.show_as_action_never); 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -