Which of the following best explains the code below ??

Consider the following code 

public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
AdapterContextMenuInfo cmi = (AdapterContextMenuInfo) menuInfo;
menu.add(1, cmi.position, 0, “Open file”);
menu.add(2, cmi.position, 0, “Save file”);

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

Leave a Reply