Examveda

Where do you define the items for a menu?

A. It depends on where the menu will be shown. For a navigation drawer menu, add an <item> tag for each menu item in the menu.xml file in the res > drawer folder. For the options menu, add an <item> tag for each menu item in the menu.xml file in the res > options folder.

B. In the layout file for the fragment or activity that displays the menu, add a <menu> tag that contains <item> tags for each item.

C. In a menu_name.xml file in the res > menu folder, add an <item> tag for each menu item. Create separate XML files for each separate menu.

D. In the AndroidManifest.xml file, add a <menus> tag that contains a <menu> tag for each menu, that in turn contains an <item> tag for each menu item.

Answer: Option C


This Question Belongs to Computer Science >> Kotlin Program

Join The Discussion

Related Questions on Kotlin Program

What is Kotlin?

A. A new version of Java.

B. A JavaScript framework.

C. A statically-typed programming language for the JVM, Android, and browser.

D. A database management system.