AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 93


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?

Show Answer
Correct Answer: C

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.

Discussion

1 comment
Sign in to comment
MmadiOption: C
Dec 31, 2022

C. This function inflates an XML file in the res/menu folder into menu items