Creating a TabHost with Tabs containing Activities WITHOUT extending TabActivity

by mscwd01 » Tue, 09 Dec 2008 01:45:24 GMT

Sponsored Links
 I need a way to create a TabHost which has an intent as the tabs
content, e.g:

TabHost tabs = (TabHost)findViewById(;
TabSpec spec1 = tabs.newTabSpec("TabOne");
spec1.setIndicator("Tab One", this.getResources().getDrawable
spec1.setContent(new Intent(this, MyTabClass.class));

Without extending TabActivity.

I am currently extending MapActivity, which I cannot change as it is
needed. Therefore, I currently get the following error at runtime,
when the tab is clicked:
java.lang.IllegalStateException: Did you forget to call 'public void
setup(LocalActivityManager activityGroup)'?

Is there a way to call "setup(LocalActivityManager activityGroup)"
WITHOUT extending TabActivity?

Please say there is ;)



Other Threads

1. Android App Store

Was wondering if its possible to run the Android App Store application
on the emulator. I'd like to browse the store and see what apps are
available w/o having to buy the phone. I checked out the GIT
repository, but don't see the App store application in there. I'm
guessing Google is keeping that closed. :(
Would be nice if they at least provided us with the application in the

2. GridView Selector Padding

How do you change the padding on the GridView selector?  With the
default settings, the selector is wider than my column width.  I could
use setSelector but I would rather not muck with the default

3. Problems with socket connection

4. PreferenceActivity Refresh Problem

5. process ids

6. How to export a "signed" apk package from Eclipse?

7. MyLocationOverlay Disappears