I have menu xml file in menu->main.xml in which two item are available. I have two activities and i want to add this two item in overflow menu in first activity but in the second activity i want to add only one item in overflow menu.
menu->main.xml
<?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_refresh"
android:title="@string/action_refresh"
app:showAsAction="never"/>
<item
android:id="@+id/action_setting"
android:title="@string/action_setting"
app:showAsAction="never"/>
</menu>
So how to do that?
app:showAsAction="never"means those menu option not at all visible in action bar ..