Adding a button to the ActionBar with ActionBarSherlock

前端 未结 2 1849
礼貌的吻别
礼貌的吻别 2020-12-09 09:55

I have been trying to add a button to the SherlockActionBar but I can\'t get it working.

This is the code that I have:

@Override
    public boolean o         


        
2条回答
  •  心在旅途
    2020-12-09 10:13

    I think in the menu.xml. Your item does not declare android:showAsAction attribute completely. You must declare it like this:

    
    
        
    
    

    Since you did not specify any icon for the item action bar cannot display any item. By default icon are display than text.

提交回复
热议问题