[英]Actionbar sherlock items not showing up
I followed the steps according to the their official website.我按照他们官方网站上的步骤操作。 Still it doesn't show up items on the actionbar.它仍然没有在操作栏上显示项目。 I also updated the theme name on manifest file.我还更新了清单文件上的主题名称。 Any help?有什么帮助吗?
Your question is so general but I think you need to change your menu xmls.您的问题太笼统了,但我认为您需要更改菜单 xmls。 They are under res/menu
.他们在res/menu
。 If the name of your class is main, then menu should be in menu_main.xml
.如果您的类的名称是 main,那么 menu 应该在menu_main.xml
。 You should change app:showAsAction
to ifRoom
or always
.您应该将app:showAsAction
更改为ifRoom
或always
。
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="always" android:icon="@drawable/ic_action_important" />
</menu>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.