Android Tablayout 将 textAllCaps 设置为 False 不起作用 [英] Android Tablayout Set textAllCaps to False not working

查看:42
本文介绍了Android Tablayout 将 textAllCaps 设置为 False 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的 ViewPager Tab 文本设为小写,但它不起作用

我已经搜索并检查了与此相关的其他帖子,尝试了他们的解决方案,但仍然无效

I have searched and checked other post related to this, tried their solution, but still doesn't work

<style name="MyCustomTabLayout" parent="Widget.Design.TabLayout">
      <item name="tabTextAppearance">@style/MyCustomTextAppearance</item>
</style>

<style name="MyCustomTextAppearance" parent="TextAppearance.Design.Tab">
      <item name="textAllCaps">false</item>
</style>

ViewPager 标签布局

<android.support.design.widget.TabLayout
        android:id="@+id/tabs"
        app:textAllCaps="false"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/MyCustomTabLayout" />

请问有任何已确认的可行解决方案吗?

Please any confirmed working solution to this?

谢谢.

推荐答案

有点晚了,但希望对大家有所帮助.如果您使用支持设计,那么您只需要在选项卡布局中添加下面提到的行并获得预期结果.

Its bit late but hope it will help some one. If you are using support design then you just need to add below mentioned line in your tab layout and get the expected results.

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

这篇关于Android Tablayout 将 textAllCaps 设置为 False 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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