Android TabHost deprecated

android, android-tabs

Solution

There are many points to your question,

- `TabHost` is not deprecated yet. Recently Google deprecated `TabActivity` and `ActivityGroup`.

- Even if it deprecated, it doesn't mean it can't be used. If X is deprecated, it only means a better alternative named Y is there.

Now to answer your question, You have more than one options

- You can use ActionBarSherlock as other answers suggests. (EDIT : ActionBarSherlock is now deprecated.)

- You can use `TabHost` with fragments, See my answer here for a good example. To use `Fragment` in pre 3.0 API's you need to use Google's support library.

Problem

I am creating application which will support `Android 2.2` `to Android 4.1`. The `TabHost` is `deprecated in Android version 3.2`. But the created application supported in all the `versions`. But I want to create the `Tab bar` application which will look like a `tab bar` `in Android 4.1` while running the application in `Android 4.2`, If I am running the application in below `android 3.2 version` device, it must look like the `tab bar` in that device. How can I do this.?

Original source

Related problems