Android ActionBar MenuItem LowerCase

后端 未结 7 1311
孤独总比滥情好
孤独总比滥情好 2020-12-13 06:41

I want to make MenuItem title in the ActionBar to LowerCase.

my menu.xml

  

        
7条回答
  •  爱一瞬间的悲伤
    2020-12-13 07:10

    Solution for native ActionBar implementation:

    
    
        
        
    
    

    If you are using ActionBarSherlock there are two different approaches:

    1) Create boolean resource abs__config_actionMenuItemAllCaps and set it to false:

    
    
        false
    
    

    2) Or create theme with overriden actionMenuTextAppearance and use it in AndroidManifest.xml:

    
    
        
        
    
    

    PLEASE NOTE: there is bug in ActionBarSherlock that forces MenuItem to be upper case on pre-ICS (https://github.com/JakeWharton/ActionBarSherlock/issues/969). I've submitted patch but it is not merged at the moment. For now you can use my fork: https://github.com/alexander-mironov/ActionBarSherlock/tree/dev, I will update this answer when my code is merged in the main repository.

    UPDATE: my fix has been merged into main ActionBarSherlock repository.

提交回复
热议问题