astuetz / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
139 stars 44 forks source link

setShouldExpand is useless. #114

Open ihrthk opened 10 years ago

kmorey commented 10 years ago

I have two pages in my ViewPager and if I set setShouldExpand = true, then the tabs expand to fill the width of my PagerSlidingTabStrip, which is what I would expect.

What do you mean setShouldExpand is useless?

vandus commented 10 years ago

You must first setShouldExpand and only then you should set the viewpager to it. If you first set the ViewPager to it and then call setShouldExpand, it does not work. Maybe this would help you?

rrbrambley commented 9 years ago

@vandus yes! thank you for this.

aykutersahin commented 9 years ago

What if i got 4 tabs? Then setShouldExpand is not effect on anything?. Tabbar layout became scrollable which i dont want? Is there any solution about more than 3 tabs?