我使用actionbarsherlock作为操作栏。效果很好 在 android 1.x 和 2.x 下,但经过一些测试后我注意到 菜单项在 android 4.x 中不显示。 这是我的菜单项的 xml
<?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>
这就是 android 4.x 下的样子
最佳答案
尝试在 onCreate 中的 super.onCreate(savedInstanceState) 之前使用 setTheme(R.style.Theme_Sherlock)
关于java - Actionbarsherlock 在 Android 4.x 中不会显示菜单项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12266270/