Items can be added to a menu in code using:
- addView()
- menu.insertItem()
- menu.add(groupId, itemId, order, title)
- setItems()
Answer
C) menu.add(groupId, itemId, order, title)
Menu.add() creates items programmatically.
Computer Science MCQ · More Lab: Menus and Messages MCQs · Practise