文本显示在操作栏选项卡中的福尔摩斯全部大写 [英] Text appear all caps in Action Bar Tabs in Sherlock

查看:151
本文介绍了文本显示在操作栏选项卡中的福尔摩斯全部大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我现在用的是福尔摩斯库,实现了 ActionBarTabs 在Android的,但有一些奇怪的问题,该文本出现在标签是全部大写。我不想让所有帽首府Changsha。我怎样才能achive呢?

Hello I am using the Sherlock library to achieve the ActionBarTabs in Android but there is some weird issue that text appear in the Tabs are all caps. I dont want to make all caps to captital. How can I achive this ?

我试过,但这个是行不通的。

I tried this but this is not working

价值观v14.xml

values-v14.xml

<style name="TariffPlansTheme" parent="Theme.Sherlock">
    <item name="actionMenuTextAppearance">@style/MyMenuTextAppearance</item>
    <item name="android:actionMenuTextAppearance">@style/MyMenuTextAppearance</item>
</style>

<style name="MyMenuTextAppearance" parent="TextAppearance.Sherlock.Widget.ActionBar.Menu">
    <item name="android:textAllCaps">false</item>
</style>

AndroidManifest.xml中

AndroidManifest.xml

<activity
    android:name="TariffPlansActivity"
    android:label="@string/title_activity_tariff_plans"
    android:screenOrientation="portrait" 
    android:theme="@style/TariffPlansTheme">
</activity>

在此先感谢。

Thanks in advance.

推荐答案

这解决了我的问题。我用错了父样式菜单,而不是标签

This solved my issue. I was using wrong parent style Menu instead of Tab

<resources>

    <style name="AppTheme" parent="android:Theme.Holo.Light" />

    <style name="TariffPlansTheme" parent="Theme.Sherlock">
        <item name="actionBarTabTextStyle">@style/My.TabText.Style</item>
        <item name="android:actionBarTabTextStyle">@style/My.TabText.Style</item>
    </style>

    <style name="My.TabText.Style" parent="@style/Widget.Sherlock.ActionBar.TabText">
        <item name="android:textAllCaps">false</item>
    </style>

</resources>

这篇关于文本显示在操作栏选项卡中的福尔摩斯全部大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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