I'm trying to get use to Android Honeycomb by creating a simple text editing application which utilizes the Action Bar and tabs. I am running into an annoying issue though. After a tab has been created and added to the Action Bar I would like to change the text displayed on the tab. I thought that using the following method, ActionBar.Tab.setText(CharSequence arg0) would do the trick, however, it doesn't seem to be changing the viewable text. What's weirder still is that if I were to call getText() it returns the text that I changed the tab to. Below is a snippet of code that I am using to change the tab text:
int currentTabIndex = ab.getSelectedNavigationIndex();
currentTabTitle = (String) ab.getTabAt(currentTabIndex).getText(); // just to check
ab.getTabAt(currentTabIndex).setText(fileName); // change tab text
currentTabTitle = (String) ab.getTabAt(currentTabIndex).getText(); // just to check
I really am at a loss and have searched everywhere. I would greatly appreciate any advice that anyone has. Thanks for your time.