0
votes

I have an Android application for pre-Honeycomb devices that uses custom tabs to launch various activities in the app. I'm using Android Compatibility Library and each activity contains one fragment.

I want to develop the app for Honeycomb devices also and I would like to use the tabs in the actionbar for version >= 11 instead of the custom tabs that i use in versions < 11.

My first question is if it is possible to use the tabs in the actionbar for launching activities and if yes, how? I see from the documentation that the main purpose of the tabs is to show/hide fragments and not entire activities.

What other solutions do I have?

EDIT: I can see that I can call other activities from my implementation of ActionBar.TabListener so I think this would work. Is there a possible problem with this approach?

1

1 Answers

0
votes

Yes, it is possible to launch activities from tabs. However, it's a bit tricky because some of the TabListener callbacks are called even when creating the tabs for the first time.