I have an Android application with 3 tabs in TabHost (text labels, no images). I set up the tabs like this:
intent = new Intent().setClass(this, AnnouncementsActivity.class);
spec = tabHost.newTabSpec("news").setIndicator("News").setContent(intent);
tabHost.addTab(spec);
I am running a background thread to retrieve ads from my server, and I want to update the text label on the tab to tell the user how many new ads there are. For example, I want to change the text on the tab to "News (3)". How can I access and change the text label on a tab?
Any suggestions are welcome!
source
share