I’m trying to implement tabs in Android.
Looking through some online tutorials, it looks like it’s implemented by using TabActivity. But TabActivity is deprecated.
The Android developer reference recommends using Fragments for versions above HONEYCOMB, but this is apparently not supported on older versions (about 60% of phones today).
So, what is the best approach for implementing tabs that’s supported on all versions? Would it be easier to just manually build the tabs into the layout?
Thanks for the answers, but decided it would be easier to just manually implement tabs.
Took a RadioGroup, customized it completely, so that it would look and act like a tab.
Then used a ViewFlipper to switch screens similar to the code given here.
Added the layouts I wanted to flip between:
A bonus was that it let me make nicer tabs easily and easily control and customize how the page changing works. And it looks the same on all phones.