I am Working on One Application which has Settings
Screen which Opens When User Click on OptionMenu Shortcut which shows on Devices as Default Button or any other Sign.
it Works fine when there is default menu button in device but not getting any Sign for Menu Option when there is not any default menu button in devices.
My Code is as Below:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_setting, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.btnSettingMenu:
Intent intent = new Intent(MainActivity.this,
RegisterActivity.class);
intent.putExtra("From", "MainActivity");
startActivity(intent);
break;
default:
break;
}
return true;
}
I have refered to Link HERE but could not able to solve my problem.
Point I would like to add is: I am getting the Menu Option in Emulator when i am pressing PageUp
or F2
.
But when the Device Does not have Default Menu Button it is not Showing with any other indication as three dots or some other way.
My Question : How can User Go to my Setting Screen if he is not Finding Option Menu Sign in real devices Like Nexus 7?
Thanks in Advance.