How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets android android

How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets


Override onPrepareOptionsMenu() in the fragment of the preference with this:

@Overridepublic boolean onPrepareOptionsMenu(Menu menu) {    MenuItem item= menu.findItem(R.id.menu_settings);    item.setVisible(false);    super.onPrepareOptionsMenu(menu);    return true;}

if you have more then one item set all the items visibility flag to false

and add the command setHasOptionsMenu(true);to the onCreate command

after you will set all the visibility of the items to false the menu will disappear

on activity, the only difference is the onPrepareOptionsMenu is boolean and you don't need to add the setHasOptionsMenu(true); command on the creation


I just deleted the method :

@Overridepublic boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {    getSupportMenuInflater().inflate(R.menu.main, menu);    return true;}

then that three-dot-menu goes away (:


Hope it helps.


 @Override public boolean onCreateOptionsMenu(Menu menu) {       return false; }