ActionBarSherlock items not appearing in overflow

前端 未结 3 1544
情书的邮戳
情书的邮戳 2020-12-11 18:23

I\'m trying to restyle my app to an ICS look and feel with ABS. Getting the ActionBar itself was nice and straightforward, however adding menu items has not been.

M

3条回答
  •  一个人的身影
    2020-12-11 18:29

    just use this code boath menu are on ActionBar:

    
    
        
        
     
    

    its look like:

    enter image description here

    Because if you are use

    android:showAsAction="ifRoom" : Only place this item in the Action Bar if there is room for it.
    

    and

    android:showAsAction="Never" : Never place this item in the Action Bar.
    

    if you use like :

    
    
            
            
         
    

    then its look: one is on ActionBar & 2nd is open when you press menu button.

    enter image description here

    Note : Its working fine in < 3.0 Android OS so don't worry. But if you have multiple menu item(more then 3) with android:showAsAction="ifRoom" then it show you depend on device screen size.

    in Protrait:

    enter image description here

    in Landscape:

    enter image description here


    After Doing all above i ll saggest you to use below way in < 3.0 Android os:

    enter image description here

    code:

    
    
        
    
            
            
                
                
            
        
    
    
    

提交回复
热议问题