小写的 TabLayout 选项卡标题文本 [英] TabLayout Tab Title text in Lower Case

查看:42
本文介绍了小写的 TabLayout 选项卡标题文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Min SDK 15 的应用程序中使用了 android.support.design.widget.TabLayout.

I have used android.support.design.widget.TabLayout in my application with Min SDK 15.

默认情况下,它采用大写的 Tab 标题,但我希望它在textCapsWord"中制作.我尝试按照建议添加样式 here此处.但不幸的是两者都不起作用.

By default it takes Tab title in capitals but I want it to make in "textCapsWord". I tried adding Style as suggested here and here. But unfortunate both doesn't work.

推荐答案

如果您将以下行添加到您的 TabLayout 中,它应该可以工作:

If you add the following line to your TabLayout it should work:

app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"

像这样使用它:

<android.support.design.widget.TabLayout
                    android:id="@+id/tabLayout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:tabIndicatorColor="@android:color/white"
                    app:tabIndicatorHeight="2dp"
                    app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
                    app:tabSelectedTextColor="@android:color/white"
                    app:tabTextColor="@android:color/white" />

这篇关于小写的 TabLayout 选项卡标题文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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