I’m looking to have 3 or 4 tabs, which will each lead to a different activity. However, so far it appears that I am going to have to set up the tabs in each individual activity.
Is there a simple way to declare a set of tabs under the actionbar, and keep the state consistent, even when activities are switched?
Use
Fragments. This will require one activity andnfragments (wherenis the number of tabs).Jake Wharton has provided some sample code illustrating how you can implement this behavior.