ghahramani / viewpager

Google Play Music Tabs and View Pager
Apache License 2.0
47 stars 41 forks source link

tabStrip not ajusting its size correctly #6

Open ricardoalcocer opened 10 years ago

ricardoalcocer commented 10 years ago

If the ViewPager module is added to a tabgroup in a page that is not the first, when you go to the tab page containing the viewPager, the tabStrip has all the pages pushed to the left. It seems like at the time the module was adjusting its children, the screen dimensions where not available, maybe line 52 of PagerTabsView.java. I've tried using the pageScrolled event, which fires as soon as you arrive to the viewPager to reassign the shouldExpand property, but it seems like those properties can only be added in the constructor and not at runtime. Changing orientation seems to trigger some sort of repaint event that properly sets the tabStrip the way it should.

Any ideas?