Consider the following the code:
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.game_menu, menu);
return true;
}
Which of the following is true about the code above?
Consider the following the code:
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.game_menu, menu);
return true;
}
Which of the following is true about the code above?
The method onCreateOptionsMenu is used to populate the options menu when the user accesses it on the app. In the method, the MenuInflater is used to inflate an XML file from the res/menu folder into menu items, making option C the correct answer.
C. This function inflates an XML file in the res/menu folder into menu items