Reputation: 4002
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
Reputation: 41
<item name="textAllCaps">false</item>
<item name="android:textAllCaps">false</item>
in your MyCustomTextAppearanceandroid:theme="@style/MyCustomTabLayout"
withstyle="@style/MyCustomTabLayout"
Upvotes: 4
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
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
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