在AppCompact主题中更改操作栏选项卡文本大小 [英] Changing Actionbar Tab Text Size in AppCompact Theme

查看:76
本文介绍了在AppCompact主题中更改操作栏选项卡文本大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经四处搜寻,并尝试了几种方法来更改动作栏标签"的文字样式.

I've search around and tried several ways to change the Actionbar Tab text style.

我想要立即显示"文本的较大文本大小.

I would like the bigger text size for that "NOW SHOWING" text.

这是我的主题.

  <style name="Theme.Tabtheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
    <item name="actionBarItemBackground">@drawable/selectable_background_tabtheme</item>
    <item name="popupMenuStyle">@style/PopupMenu.Tabtheme</item>
    <item name="dropDownListViewStyle">@style/DropDownListView.Tabtheme</item>
    <item name="actionBarTabStyle">@style/ActionBarTabStyle.Tabtheme</item>

    <item name="android:actionBarTabTextStyle">@style/ActionBarTabTextStyle.Tabtheme</item>
    <item name="actionBarTabTextStyle">@style/ActionBarTabTextStyle.Tabtheme</item>

    <item name="actionDropDownStyle">@style/DropDownNav.Tabtheme</item>
    <item name="actionBarStyle">@style/ActionBar.Solid.Tabtheme</item>
    <item name="actionModeBackground">@drawable/cab_background_top_tabtheme</item>
    <item name="actionModeSplitBackground">@drawable/cab_background_bottom_tabtheme</item>
    <item name="actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Tabtheme</item>

    <!-- Light.DarkActionBar specific -->
    <item name="actionBarWidgetTheme">@style/Theme.Tabtheme.Widget</item>

  </style>

  <style name="ActionBarTabTextStyle.Tabtheme" parent="Widget.AppCompat.Base.ActionBar.TabText">
    <item name="android:textSize">18sp</item>
  </style>

我在做什么错?

推荐答案

这对我有用.我可以更改文本的大小和颜色.尝试删除actionBarWidgetTheme

This works for me . I am able to change the text size and color. Try removing the actionBarWidgetTheme

<style name="Theme.Tabtheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">

    <item name="android:actionBarTabTextStyle">@style/ActionBarTabTextStyle.Tabtheme</item>
    <item name="actionBarTabTextStyle">@style/ActionBarTabTextStyle.Tabtheme</item>

</style>

<style name="ActionBarTabTextStyle.Tabtheme" parent="Widget.AppCompat.Base.ActionBar.TabText">
    <item name="android:textSize">18sp</item>
    <item name="android:textColor">@color/Red</item>
</style>

这篇关于在AppCompact主题中更改操作栏选项卡文本大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆