【问题标题】:Format text in Action Bar / Tabs格式化操作栏/选项卡中的文本
【发布时间】:2012-05-27 21:08:00
【问题描述】:

我正在使用 Action Bar Sherlock 提供的“样式化”示例。

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

【问题讨论】:

    标签: android android-actionbar


    【解决方案1】:

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

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

    记得在你的主题中引用它两次:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多