Tosin Onikute
Tosin Onikute

Reputation: 4002

Android Tablayout Set textAllCaps to False not working

I am trying to make my ViewPager Tab text in small caps but its not working,

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 Tab layout

<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?

thanks.

Upvotes: 10

Views: 7829

Answers (4)

W. Liz
W. Liz

Reputation: 41

  1. Try using both <item name="textAllCaps">false</item> <item name="android:textAllCaps">false</item> in your MyCustomTextAppearance
  2. In your ViewPager tab layout, replace android:theme="@style/MyCustomTabLayout"withstyle="@style/MyCustomTabLayout"

Upvotes: 4

Amit Vaghela
Amit Vaghela

Reputation: 22945

This issue was reported on google https://code.google.com/p/android/issues/detail?id=202117

where the app:textAllCaps = "false" style did not work.

But after release of Android Support Library, revision 23.2.1 (March 2016) This issue has been resolved.

update Support Library to Android Support Library to 23.2.1

https://developer.android.com/topic/libraries/support-library/revisions.html

Upvotes: 0

Tara
Tara

Reputation: 2648

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"

Upvotes: 12

reidisaki
reidisaki

Reputation: 1524

Have you tried this The createDefaultTabView() method.

Needed to change textView.setAllCaps(true) to false.

Sliding tab layout text is uppercase

Upvotes: -1

Related Questions