Android Option Menu

Example:

                                    
                                        // option_menu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:id="@+id/item1"
            android:title="Item 1"/>
    
        <item android:id="@+id/item2"
            android:title="Item 2"/>
    
        <item android:id="@+id/item3"
            android:title="Item 3"/>
</menu>



// activity_option_menu_example.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".OptionMenuExample"
        android:orientation="vertical"
        android:padding="16dp"
        android:gravity="center">
   
       <TextView
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:text="To see option menu click on three dots right hand corner in ActionBar"
           android:textSize="20sp"
           android:textColor="@color/colorOrange"
           android:textStyle="bold"/>
   
</LinearLayout>
                                    
                                  

Output