I'm trying to show the same menu options in both the ActionBar and the menu options, but it only appears in one of them, is there an easy way to do this?
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.app.MainActivity" >
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
app:showAsAction="always"/>
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="always"/>
</menu>
Items are now displayed in the action bar. Changing the application: showAsAction for android: app: showAsAction only displays menu items in the options menu to make them visible in both menus?
thank
source
share