Reputation: 53
I'm using actionbarsherlock as Actionbar. It works pretty good under android 1.x and 2.x but after some testing I noticed that the menuitems arent displaying in android 4.x. Here's the xml of my menu items
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/overview_newgame"
android:showAsAction="withText"
android:title="@string/new_game"/>
</menu>
And this is how it looks like under android 4.x
Upvotes: 0
Views: 186
Reputation: 33
Try to use setTheme(R.style.Theme_Sherlock) before super.onCreate(savedInstanceState) in your onCreate
Upvotes: 1
Reputation: 76125
withText
describes how the action item should be displayed but you have not specified where it should be displayed (hence it defaulting to never
and going into the overflow menu).
If you would like it to show up on the action bar you should specify ifRoom
.
See the setShowAsAction
documentation.
Upvotes: 0