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:
Verified
Q158: How is the lifecycle of Service connected
Q159: What is the default background color of
Q160: In which Android version were Runtime permissions
Q161: Which of the following permission is necessary
Q162: Which of the following methods updates a
Q164: When is the intent resolution process triggered?
A)
Q165: Which of the following is required to
Q166: Which of the following are primary pieces
Q167: Best practice to implement Google Maps is
Q168: Which of the following applies to the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents