0

I'm trying to make action bar to appear always.

I'm getting:

error: No resource identifier found for attribute 'showAsAction'

My menu codes are:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:Logo="http://schemas.android.com/apk/res-auto">

<item
    android:id="@+id/answered"
    android:icon="@drawable/answered"
    android:title="answered"
    Logo:showAsAction="always"/>

<item
    android:id="@+id/notanswered"
    android:title="notanswered"
    android:icon="@drawable/notanswered"
    Logo:showAsAction="always"/>
</menu>

target=android-15
Minimum Sdk is 8

Sam M
  • 159
  • 1
  • 3
  • 12

2 Answers2

0

Since ur min target is 8 but you need to ensure Honeycomb = API level 11 = Android 3.0.x for showAsAction

KOTIOS
  • 11,177
  • 3
  • 39
  • 66
0

Make sure your project's build target(not your min-sdk version) is set to Honeycomb(Api Level 11). Remember to do a clean after you change the build target.

Also, to enable your app support action bar below 3.0 you need to use the app compact v7 from the support library(appcompat_v7). Import the library to your workspace and reference it in your project.

Check this link

Nana Ghartey
  • 7,901
  • 1
  • 24
  • 26