tyb
tyb

Reputation: 4749

Format text in Action Bar / Tabs

I'm playing around with the "Styled" Sample provided by Action Bar Sherlock.

I added a couple tabs to the original three tabs and changed their names. But now it looks awful because the tab titles are too big to be displayed so everything is scrolling in a narrow space. Is it possible to decrease the text size?

Upvotes: 2

Views: 2274

Answers (1)

Karoo
Karoo

Reputation: 552

You just need to override the default tab text style:

<style
    name="MyActionBarTabTextStyle"
    parent="Widget.Sherlock.ActionBar.TabText">
    <item name="android:textSize">12sp</item>
</style>

And remember to reference it twice in your theme:

<item name="actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>

Upvotes: 4

Related Questions