android - PagerSlidingTabStrip making horizontalscrollview's width fixed -



android - PagerSlidingTabStrip making horizontalscrollview's width fixed -

i'm using pagerslidingtabstrip library in application now. have 5 tabs, it's on screen width. have scroll see lastly tab.

i want see tabs on screen , never wanna scroll see other items.

i tried changing horizontalscrollview linearlayout in pagerslidingtabstrip.java it's weird little. indicator moved bad.

// public class pagerslidingtabstrip extends horizontalscrollview public class pagerslidingtabstrip extends linearlayout

and tried shouldexpand options true. didn't work again.

app:pstsshouldexpand="true"

what can ????

i had same problem next code ,i found if need set tabs shouldexpand need before setting viewpager tabs.

tabs = (pagerslidingtabstrip) findviewbyid(r.id.slidingtabstrip); //before setting view pager tabs.setshouldexpand(true); //works tabs.setviewpager(vppager); //after setting view pager tabs.setshouldexpand(true); //will not work

android pagerslidingtabstrip

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -