How to Create Android Menus

In android application menu is one of the important user interface entity which provides some action options for a particular view. In this tutorial i am discussing about creating android menus.

The final output of menu tutorial will be like below image

In this tutorial we are creating a simple menu with 6 menu items. On clicking on single menu item a simple Toast message will be shown.

1. Create a new project File ⇒ New ⇒ Android Project and give activity name as AndroidMenusActivity.2. Now create an XML file under res/layout folder and name it as menu.xml.3. Open menu.xml file and type following code. In the following code we are creating a single menu with 6 menu items. Each menu item has an icon and title for display the label under menu icon. Also we have id for each menu item to identify uniquely.

Ravi is hardcore Android programmer and Android programming has been his passion since he compiled his first hello-world program. Solving real problems of Android developers through tutorials has always been interesting part for him.