I'm working on adding a tab to an application, but the last two tabs (regardless of order) are launching the same activity. If I go down to two tabs they both work correctly, but when I add the third the last two result in the same activity launching. Any suggestions?
public void uiConnected() {
Log.d(TAG, "UI Connected");
tabHost.clearAllTabs();
intent.setClass(this, NowPlayingActivity.class);
spec = tabHost.newTabSpec("nowplaying").setIndicator("Now Playing").setContent(intent);
tabHost.addTab(spec);
intent.setClass(this, PlaylistActivity.class);
spec = tabHost.newTabSpec("playlist").setIndicator("Playlist").setContent(intent);
tabHost.addTab(spec);
intent.setClass(this, LibraryActivity.class);
spec = tabHost.newTabSpec("library").setIndicator("Library").setContent(intent);
tabHost.addTab(spec);
if (MPDApplication.DEBUG) {
tabHost.setCurrentTabByTag(app.sp.getString(AppPreferenceActivity.KEY_APP_LASTTAB, "playlist"));
} else {
tabHost.setCurrentTabByTag(app.sp.getString(AppPreferenceActivity.KEY_APP_LASTTAB, "nowplaying"));
}
}