I've seen the menu button (three vertical dots) pop up now and then on the virtual buttons (bottom right)
What you are seeing is the "legacy menu button":
(source: blogspot.com)
It's a bad practice to still have that in your apps. It should get removed when you set your targetSdkVersion
to API 11 or higher in your Android Manifest. It should then get shifted to the ActionBar
. That should look something like this:
(source: blogspot.com)
Look at the overflow menu at the upper right corner.
If you want to know more about that, then read this.
If you want to start your PreferenceActivity
by clicking on an item by the list that gets populated by either of these menus you have to create a menu.
Override onCreateOptionsMenu
:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.my_menu, menu);
return super.onCreateOptionsMenu(menu);
}
my_menu.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/settings"
android:title="Settings"
android:showAsAction="never"/>
</menu>
Now override onOptionsItemSelected
:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch(id) {
case android.R.id.settings:
// Start your Activity in here.
break;
}
return super.onOptionsItemSelected(item);
}