Actionbar not shown with AppCompat

Use the compat name space for your menu items like this:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:compat="http://schemas.android.com/apk/res-auto" >
    <item android:id="@+id/action_whatever"
      android:icon="@drawable/ic_action_whatever"
      android:title="@string/whatever"
      compat:showAsAction="ifRoom"  />
</menu>

Leave a Comment