jpardogo / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
2.19k stars 354 forks source link

1.09 update - broke text left/right padding. Cannot have a tabStrip less than full width that does not scroll now #76

Closed ZakTaccardi closed 9 years ago

ZakTaccardi commented 9 years ago

I have a tabstrip with 3 options. I would like to have some left padding. In 1.08, if you added an equal amount of right padding, the tab strip would not be scrollable if it didn't need to be. In 1.09, it scrolls even with the same amount of left and right padding.

<com.astuetz.PagerSlidingTabStrip
        android:id="@+id/slidingtabs"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/colorPrimary"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:textColor="@android:color/white"
        app:pstsTextAlpha="127"
        app:pstsIndicatorColor="@android:color/white"
        app:pstsTextColorSelected="@android:color/white"
        android:elevation="@dimen/default_appbar_elevation"
    />

screenshot_2015-02-25-20-07-28 screenshot_2015-02-25-20-07-36

jpardogo commented 9 years ago

I have just tested on my nexus 5 and it works fine for me. I am gonna need more information of your case to know why it doesn't for you.

"In 1.08, if you added an equal amount of right padding, the tab strip would not be scrollable if it didn't need to be." Do you mean that the tabs weren't scrollable? If it happened in 1.0.8 then it was a bug.

ZakTaccardi commented 9 years ago

When I mean the tabs are scrollable, I don't mean the content in the view pager below it. Just the tab strip itself. Like if you have more tabs that are visible on the screen, you can drag to the left to see more tab choices. If you only have 3 tabs that easily fit in the width of the screen, they shouldn't scroll when you swipe your finger across the tabs.

in 1.08, if a tabstrip set (with no padding) that was < than the width of the screen, the tabstrip would not scroll if you swiped it. If you added some left padding, it would scroll. If you balanced it out with the same amount of right padding, and the tabs were still less than the screen width, it would no longer scroll. What is the intended behavior here?

In 1.09, with an equal amount of right and left padding, the tab strip will scroll when you add any padding (like in the images I provided above). This is not what I want. I am trying to get something like the play store (My Apps/All) functionality.

ZakTaccardi commented 9 years ago

Sorry - I was wrong about this. Looks like as soon as you add padding, it enables scrolling, regardless of version. I will close this issue and reopen a new one