Thanks TDS, Ive got that part but I would like to show/hide the top right menu when the user presses the menu physical key. I guess I can just interecept the menu pkey and force the user to push the toolbar menu but it would be nicer to show the menu.
Something like this Java code but I dont know how to get the toolbar menu object;
B4X:
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU) {
if (mToolbar.isOverflowMenuShowing()) {
mToolbar.hideOverflowMenu();
} else {
mToolbar.showOverflowMenu();
}
return true;
}
return super.onKeyUp(keyCode, event);
}