Ashwin Sathawane Ashwin Sathawane - 6 months ago 76
Swift Question

How can I have center the selected tab with XLPagerTabStrip?

I want to have a viewpager having 5 tabs. Max. 3 should be visible at a time, having equal widths and it should center the selected tab.
It would be like Fotmob's app screen.

The layout would be like this:

Yesterday | Live| Today | Tomorrow | Day after Tomorrow

How can I achieve this with

Answer Source

Set buttonBarLeftContentInset and buttonBarRightContentInset in to a high value, that will center the selected item. = 9999 = 9999

Sadly, there is no easy way to set up the maximum visibility count with XLPagerTabStrip. You can try to set different values (considering the screen/font size) for

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download