I'm trying to write code so that when a button is pressed, the dropdown menu in the navigation bar comes up. I tried making something similar to the following prefab function (which I understand to be the one responsible for opening the menu)
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main_class, menu);
return true;
}
Problem is that I don't know where they get the menu
variable from. What should I put in it's place to complete the following function?
public void launchMenu(View view) {
getMenuInflater().inflate(R.menu.main_class, (Menu) /* menu variable */);
}