In the Android Design Guidelines it states that "There are two types of tabs: fixed and scrollable."
I can't find any documentation in the ActionBar documentation to support the ability to specify either type of tabs.
How do you specify a tab group to be fixed or scrollable? If you can't, what governs whether the tabs are fixed or scrollable exactly?
The number of tabs dictates whether the tab group is fixed or scrollable. For example, if you have one tab, they'll be fixed but if you have like six then they'll become scrollable because all six can't fit on one screen.
If you want to see it in action on a pre-3.0 device, download the Action Bar Sherlock sample and select Feature Toggles from the main list and then select "Tabs" as your navigation mode. Now you can add tabs to the bar and at first, they'll get smaller to cram them all in and then once you have enough you can scroll through them.
UPDATE: There is now a page on this in the official documentation that says "Fixed tabs are displayed with equal width, based on the width of the widest tab label. If there is insufficient room to display all tabs, the tab labels themselves will be scrollable." Read more here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With