当我执行以下操作
ActionBar actBar = getSupportActionBar();
actBar.setDisplayShowHomeEnabled(true);
actBar.setIcon(R.drawable.noconnection);
答案 0 :(得分:0)
如果您打算在操作栏上添加非图标按钮,请通过设置android:enabled="false"
将菜单选项标记为已禁用,并始终通过设置android:showAsAction="always"
来显示菜单选项