Michael A
Michael A

Reputation: 5840

Tabs layout and Android sdk

Until now I was using TabActivity for Tabs layout.

Since this Activity is deprecated What will be the best way to form a tabs interface?

I saw many tutorials showing the use of TabFragments but this is good only for high sdk version (15 and higher).

So what objects can I use for tabs layout considering it should work with API 10 and above and of course not deprecated?

An example will be great!

Upvotes: 1

Views: 585

Answers (2)

hardartcore
hardartcore

Reputation: 17037

I faced the same question while ago too and the best solution is use ActionBarSherlock with Fragments and there is a really nice tutorial how to implement TabHost in your app which you can find here :

ActionBarSherlock:FragmentTabs.

It worked for me, hope it will work for you too : )

P.S. And one another thing, it is really good when you are building an application to look for design guidelines and the best ways you can build your app so you can take advantage of the latest news in Android App Development.

Upvotes: 1

AndroidLearner
AndroidLearner

Reputation: 4636

As Commonsware said here ::

"Deprecated" in Android means "we think there is a better solution that you should investigate". Rarely does "deprecated" mean "it is unusable". TabHost, AFAIK, works fine on Android 4.0.

There are also project named ActionBarSherlock which demos have all the capability of the compatibility library. Source code is also available on github.

There is also this tutorial which helps you how to use TabFragement.

Upvotes: 2

Related Questions