Android 设置操作栏/选项卡中的文本格式

Android 设置操作栏/选项卡中的文本格式,android,android-actionbar,Android,Android Actionbar,我正在玩动作酒吧夏洛克提供的“风格化”样本 我在原来的三个选项卡上添加了几个选项卡,并更改了它们的名称。但现在看起来很糟糕,因为标签标题太大,无法显示,所以所有内容都在狭小的空间中滚动。是否可以减小文本大小?您只需覆盖默认选项卡文本样式: <style name="MyActionBarTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText"> <item name="android:textSiz

我正在玩动作酒吧夏洛克提供的“风格化”样本


我在原来的三个选项卡上添加了几个选项卡,并更改了它们的名称。但现在看起来很糟糕,因为标签标题太大,无法显示,所以所有内容都在狭小的空间中滚动。是否可以减小文本大小?

您只需覆盖默认选项卡文本样式:

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

12便士
记住在主题中引用两次:

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

您只需覆盖默认选项卡文本样式:

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

12便士
记住在主题中引用两次:

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