Action buttons doesn’t show up on Action Bar? [duplicate]

This is because if you use the support AppCompat ActionBar library and ActionBarActivity you should create your menus in a different than the standard way of creating xml menus in ActioBarSherlock or the default ActionBar.

So try this code :

<menu xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:app="http://schemas.android.com/apk/res-auto">
      <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_compose"
          android:icon="@drawable/ic_action_compose"
          android:title="@string/action_compose" 
          app:showAsAction="always"/>
</menu>

Leave a Comment