Solved

Consider the Following Code: @Override Public Void OnCreateContextMenu(ContextMenu Menu, View

Question 42

Multiple Choice

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?


A) The code inflates an xml file into menu items.
B) The code creates menu items for context menu programmatically.
C) The code assign actions to menu items.
D) The code opens a menu resource file, modifies it, and saves the changes.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions