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"