I am currently working on 2.3 version of android and I want to switch my app to 4.0 version but the TabActivity
is deprecated. So I was looking for working example of FragmentTabs
but I am not able to find one. Can anyone help?
Asked
Active
Viewed 3.3k times
10

Jeff Axelrod
- 27,676
- 31
- 147
- 246

Rookie
- 8,660
- 17
- 58
- 91
-
2A Google search revealed these: http://android.codeandmagic.org/2011/07/android-tabs-with-fragments/ http://neilgoodman.net/2012/03/12/working-with-fragments-on-android-part-2/ – Rajesh Apr 30 '12 at 11:58
-
possible duplicate of [Creating a tabs using Fragments now that TabActivity is deprecated](http://stackoverflow.com/questions/7599816/creating-a-tabs-using-fragments-now-that-tabactivity-is-deprecated) – Casebash Aug 09 '12 at 05:23
-
The best tutorial: http://neilgoodman.net/2012/03/12/working-with-fragments-on-android-part-2/ – Fernando JS Oct 26 '12 at 15:36
3 Answers
18
I've found the FragmentTabs
example from the API Demos project to be very useful.
Just create a new Android sample project from Eclipse and choose the API demos (try API 13). Also for the support (compatibility) library, there's a FragmentTabs demo in the Support4Demos
also refer this link Android-FragmentTabHost-demo
-
6@Bachi, the source appears to be gone. See my edit. It was just a link to the source code. Just create a new Android sample project from Eclipse and choose the API demos (try API 13). Also for the support (compatibility) library, there's a `FragmentTabs` demo in the `Support4Demos`. – Jeff Axelrod Sep 10 '12 at 16:13
0
It's worth mentioning that Google introduced ActionBarCompat
in the v7 appcompat library (together with Android 4.3) yesterday. Here's a video overview, and here's documentation.

Haspemulator
- 11,050
- 9
- 49
- 76