-
Notifications
You must be signed in to change notification settings - Fork 8
Why do we need this control?
Tabbed UIs are nothing new, but the 'traditional' way of doing tabs in Android (i.e. with TabHost
/TabWidget
etc) is unfriendly for a number of reasons:
- You can't easily control the styles of the tabs beyond changing the indicator colour
- Styling is inconsistent between android versions, specifically everything before 3.0 and everything after
- Changing tab text and showing/hiding tabs is not trivial
- Tab text is severely constrained as all tabs are squished into the container width
An alternative is to roll your own tab functionality using a ViewPager
and then using either the PagerTitleStrip
, which you can't use as tab buttons; or PagerTabStrip
, which is clickable, but suffers again from the style-ability perspective.
What this control does is to offer greater freedom to style your tabs the way you want (including using icons instead of text), free-scrolling of the tabs themselves so your users can see at a glance what tabbed pages you offer, and a funky smooth-scrolling indicator telling the user exactly which tab they are currently looking at.
With this one control you can replicate 'standard' tab functionality (a couple of tabs spread equally across the width of the screen), but also have many tabs - with the user being able to see clearly that there are 'moar things to do' on the screen.