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. Copying 1 drawable to SD

I wanna copy a drawable to the sd card.
Lets say I have picture
in my drawable folder and I want the app to copy it to the sd card
when a certain button is pressed how can I do this>?


2. flashing element in ArrayAdapter

I have an ArrayAdapter in my activity, and when a certain event occur,
I'd like to make a specific element flash, or have it highlighted in
some way for a couple of seconds.
Is there a way to do that?


3. PVMFOMXVideoDecNode

4. Behaviour of launchMode=鈥?singleTask鈥?not as described?

5. Debugging Methods n booting time?

6. build/target/product or Vendo

7. Setting Display panel size for android.