Android
AND-401 · Question #117
AND-401 Question #117: Real Exam Question with Answer & Explanation
Sign in or unlock AND-401 to reveal the answer and full explanation for question #117. The question stem and answer options stay visible for context.
Question
Consider the following code : @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Menu"); AdapterContextMenuInfo cmi = (AdapterContextMenuInfo) menuInfo; menu.add(1, cmi.position, 0, "Open file"); menu.add(2, cmi.position, 0, "Save file");} Which of the following best explains the code above?
Options
- AThe code inflates an xml file into menu items.
- BThe code creates menu items for context menu programmatically.
- CThe code assign actions to menu items.
- DThe code Opens a menu resource file, modifies it, and saves the changes.
Unlock AND-401 to see the answer
You've previewed enough free AND-401 questions. Unlock AND-401 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.