What are the two parameters Menu and menu in method onCreateOptionsMenu(Menu menu)
and how to use this method.
I have another question why this
pa
First of all in onCreateOptionsMenu(Menu menu) function you passing only one parameter not two. You passing object of menu class there. We using this function to override the default function to customize our own menu like adding buttons and texts, images etc., in menu.
For more reference
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.game_menu, menu);
return true;
}