How to manage the width of ActionBar navigation tabs?

前端 未结 3 1616
攒了一身酷
攒了一身酷 2021-02-05 10:48

I am using ActionBarSherlock and have an ActionBar with navigation tabs in it. I want the tabs to auto-size based on the size of the text in them, but there seems to be a style

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-05 10:54

    Seems that you're just using the theme for the pre 4.0 android mode of ActionBarSherlock?

    From http://actionbarsherlock.com/theming.html:

    Mirrored Attributes

    Due to limitations in Android's theming system any theme customizations must be declared in two attributes. The normal android-prefixed attributes apply the theme to the native action bar and the unprefixed attributes are for the custom implementation. Since both theming APIs are exactly the same you need only reference your customizations twice rather than having to implement them twice.

    The easiest way to convey exactly what this entails is with an example. The following is the full theme from the “Styled” example mentioned above:

    
    
    
    

提交回复
热议问题