Create a Menu XML file

1. Create a menu directory in the res directory.

2. Add a file named of mymenu.xml to the menu directory. An item named myItem is created. An icon named ic_menu_add is used, from the default Android platform icons, with a visible text of "My Item"

<?xml version="1.0" encoding="utf-8"?>
<menu
    xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:id="@+id/myItem"
        android:icon="@android:drawable/ic_menu_add"
        android:title="My Item" />
</menu>

3. Compile and run!

4. For more items, you can add more items under the first item, befor the </menu> tag, to the above code. Such as,

    <item android:id="@+id/myItem2"
        android:icon="@android:drawable/ic_menu_delete"
        android:title="My Item 2" />

Next Recommended Article: onCreateOptionsMenu - Create an Options Menu

Resources: