Menu XML Resource
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_share"
android:title="Share"
android:icon="@drawable/ic_share_black_24dp"
app:iconTint="@android:color/white"
app:showAsAction="ifRoom">
<menu>
<item
android:id="@+id/action_share_photo"
android:title="Share Photo"
/>
<item
android:id="@+id/action_share_photo_with_text"
android:title="Share Photo with Text"
/>
<item
android:id="@+id/action_share_web_link"
android:title="Share Web Link"
/>
</menu>
</item>
<item
android:id="@+id/action_delete"
android:title="Delete"
app:showAsAction="never" />
</menu>