Hi,

I had the same question and found this thread :
http://groups.google.com/group/android-developers/browse_thread/thread/94d5c184bbee2040/720bb39f684bad76?show_docid=720bb39f684bad76
Hope it helps.

Mehdi

On Jun 11, 3:32 pm, BGH <[email protected]> wrote:
> My app starts with a tab activity that sets up activities for each of
> it's four tabs like so
>
>  public class MyApp extends TabActivity {
>
> @Override
> public void onCreate(Bundle icicle) {
>         super.onCreate(icicle);
>         TabHost host = getTabHost();
>
>     host.addTab(host.newTabSpec("one")
>                 .setIndicator("Timed Run")
>             .setContent(new Intent(this, TimedRun.class)));
>
>     host.addTab(host.newTabSpec("two")
>             .setIndicator("Results")
>             .setContent(new Intent(this, Results.class)));
>
>     host.addTab(host.newTabSpec("three")
>             .setIndicator("Vehicles")
>             .setContent(new Intent(this, Vehicles.class)));
>
>     host.addTab(host.newTabSpec("four")
>                     .setIndicator("GForces")
>                     .setContent(new Intent(this, GForces.class)));
>
> }
> }
>
> If I click on a tab and it starts that tab's assigned activity, is
> there anyway I can press a button on the layout in that activity that
> will remove the activity from that tab and replace it with a different
> activity? So basically I want to change the activity in a tab at
> runtime.
>
> Sorry for saying activity so much.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to