Reputation: 841
Anyone have a working example of fragment tabs that works on Android 2.2 and support up to ICS? Every example out there don't seem to be working even after adding the compatibility packages.
Upvotes: 0
Views: 2049
Reputation: 6594
Look FragmentsTabs and FragmentTabsPager examples of ActionBarSherlock library. Tested by me on Android 2.3 and 4.1. It works nicely and is completely reusable.
Upvotes: 0
Reputation: 4705
There is an example using an Activity with a TabHost and Fragments inside the tabs. It uses the compatibility library and works with current and older versions of Android.
If you installed the support library and the samples with your Android SDK you will have it on your disk already:
/extras/android/compatibility/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.java
Upvotes: 2
Reputation: 1047
http://developer.android.com/reference/android/app/TabActivity.html
Upvotes: 0