How to change ActionBar Tab textStyle?

前端 未结 2 1596
Happy的楠姐
Happy的楠姐 2020-12-12 00:40

By default android actionBar Tab has text-style as CAPITAL. How can I set the text-style to normal camel-case style. Like \"Abcd\" instead of \"ABCD\"(Which is the by-defaul

2条回答
  •  囚心锁ツ
    2020-12-12 01:19

    To make the tab text lowercase, create a style that inherits Widget.Holo.Light.ActionBar.TabText Widget.Holo.ActionBar.TabText and set android:textAllCaps to false.

    You can apply your own ActionBar.Tab text style by using the android:actionBarTabTextStyle attribute.

    For AppCompat compatibility, your style should inherit Widget.AppCompat.Light.ActionBar.TabText or Widget.AppCompat.ActionBar.TabText and the attributes are the same as above, minus the android prefix.

    For more information, you should read: Styling the ActionBar

    Here's an example with AppCompat compatibility:

    values

    
    
    
    

    values-v14

    
    

    Results

    Example

提交回复
热议问题