You have to define your own namespace, if you want to use the showAsAction
attribute with ActionBarCompat
(I assume you are using ActionBarCompat
because you mentioned, that you're extending ActionBarActivity
):
xmlns:app="http://schemas.android.com/apk/res-auto"
and use showAsAction
like this:
<item [...] app:showAsAction="always"></item>