PagerSlidingTabStrip
PagerSlidingTabStrip copied to clipboard
How to automatically expand the width of the tab?
Hello
How do I let the tabs get expanded if the string in the tab is too long?
This is how it looks like now:
If the string is too long, some of it doesn't appear. The weird thing is that it worked on Android 6.0, but now I am running on Android 7.0 (phone and emulator), and this happened. How to I fix it?
This is my XML code for the PagerSlidingTabStrip:
<com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs"
app:pstsShouldExpand="true"
app:pstsTextAllCaps="true"
app:pstsIndicatorColor="#8b4513"
android:layout_width="match_parent"
android:background="#ffffff"
android:layout_height="48dp" />
use pstsTabPaddingLeftRight attibute