Hide the option menu

Usually when you press the button of options of your cell phone (usually the left button), a menu comes out with the options available (sometimes it only comes out Settings) and this has to do with the menu of options that you want to provide to the application , But in some occasions you do not need it and for this it is necessary that you put in your activity the following code:

public boolean onPrepareOptionsMenu (Menu menu) {
return false;

Inside you can do what you want (practically), but everything depends on the return, if it is true, it is displayed, if it is false it is not displayed.