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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -