For some reason if i long press my menu button while my app is loading content, it is just stops just like i pressed back key.
I dont want the menu button to behave like this so my question is:
How can i completly disable menu button ? I dont ever need it in my app i just want to turn it off.
i tried:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_BACK){
onBackPressed();
}
if (keyCode == KeyEvent.KEYCODE_MENU){
return true;
}
else{
return super.onKeyDown(keyCode, event);
}
}
Menu button still working…
Any help will be appreciated!
Thanks.
You must return true for the menu to be displayed; if you return false it will not be shown.
So I’m guessing this will work: