Android ActionBar initially selected tab

Ok, this just cost me a few hours. ┬áIt’s not as described, the only way that works for me is:


actionBar.addTab(tab0, false);
actionBar.addTab(tab1, false);
actionBar.addTab(tab2, true);

The index thing is a lie, it’s order that seems to matter. I’m not sure if it’s a bug, outdated documentation, or something I’m doing wrong, but this works for me.

Posted in Code by Matt at November 27th, 2013.

Comments are closed.