Now it is preferable to use the tabs that the ActionBar gives you. It's pretty easy to set up considering you like this option. With ActionbarSherlock, you can even fully port an application to 1.6.
This is not suitable for every occasion. For example, you may want these tabs to be inside a fragment, on a screen that displays several fragments at once. In this case, you need to stick to the "obsolete" methods for setting tabs using TabWidget. It is ugly, but possible.
Edit:
Check out Jeff's comment. As he noted, I was wrong, TabWidget still works fine, TabAvtivity is an obsolete class here!
Zsombor ErdΕdy-Nagy
source share