dythe
dythe

Reputation: 841

Fragment Tabs on Android 2.2

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

Answers (3)

Roger Garzon Nieto
Roger Garzon Nieto

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

Stefan
Stefan

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

Related Questions