I have noticed that when using
actionBar.setSelectedNavigationItem(x)
in the onCreate() method of my Activity, the tab item at position 0
Percy Vega's reply seems to be the best working solution.
for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) { boolean preselected = (i == ErrorDetails.tab_id); actionBar.addTab( actionBar.newTab() .setText(mSectionsPagerAdapter.getPageTitle(i)) .setTabListener(this),preselected); }