I have noticed that when using
actionBar.setSelectedNavigationItem(x)
in the onCreate() method of my Activity, the tab item at position 0
If you have 3 tabs (i.e. tab 0, tab 1, tab 2) and want tab 1 to be preselected. Do this:
for (int i = 0; i < mFragmentPagerAdapter.getCount(); i++) {
boolean preselected = (i == 1);
actionBar.addTab(actionBar.newTab().setText(
mFragmentPagerAdapter.getPageTitle(i)).setTabListener(this), preselected);
}
You will be using:
public abstract void addTab (ActionBar.Tab tab, boolean setSelected)
as per this API specification.