There is a function openOptionsMenu()
that you could call
manually in your activity when you want to open the menu.
public void openMenu()
{
openOptionsMenu();
}
Better:
if you want the 3 dot overflow button in the navigation bar
just create your optionsMenu as usual:
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
//add your menu
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
//select what happens when you click at an item
return true;
}
and make sure to set both minSdkVersion
and targetSdkVersion
to "10"
or lower!
For example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="your.package.name">
<uses-sdk android:minsdkversion="4" android:targetsdkversion="10" />
</manifest>