AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 32


Which of the following is a call-back method that inflates an options menu from file res/menu/menu.xml?

Show Answer
Correct Answer: D

The correct call-back method to inflate an options menu from a file like res/menu/menu.xml is onCreateOptionsMenu. This method is specifically designed to handle the creation and inflation of menu resources for an activity. It provides a Menu object where the menu items are added, typically using a MenuInflater class to inflate the XML resource into the Menu object.

Discussion

2 comments
Sign in to comment
MmadiOption: B
Dec 31, 2022

B. onCreate

MmadiOption: D
Dec 31, 2022

D. onCreateOptionsMenu