PagerSlidingTabStrip icon indicating copy to clipboard operation
PagerSlidingTabStrip copied to clipboard

How to automatically expand the width of the tab?

Open Hudhud opened this issue 7 years ago • 1 comments

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: 18678987_10154327212666199_1691877758_n

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" />

Hudhud avatar May 23 '17 21:05 Hudhud

use pstsTabPaddingLeftRight attibute

newstarbka avatar Nov 01 '17 05:11 newstarbka