thx at first and some additional information...

If the tab is created then a intent is fired up to launch my-frontend-
activity and this activity starts the activity whose content should be
displayed in the tab. If the launched-by-my-frontend-activity closed
then the my-frontend-activity decide what content should be displayed
in the tab and so on...

This works "outside a tab" and my issue is to take it into a tab...

On 21 Apr., 10:36, Android Users <[email protected]> wrote:
> You have to create a class extending the ActivityGroup and set that as
> content for the tab.
>
> tabHost.addTab(tabHost.newTabSpec("Tab1")
>                 .setIndicator("Tab1")
>                 .setContent(new Intent(this, TabActivityGroup.class)
>                  .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
>
> class TabActivityGroup extends ActivityGroup{
>
> @Override
> protected void onCreate(Bundle savedInstanceState) {
>       super.onCreate(savedInstanceState);
>
>       // Some code
>
>       View view = getLocalActivityManager()
>                                 .startActivity("ReferenceName", new
> Intent(this,YourActivity.class)
>                                 .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
>                                 .getDecorView();
>        this.setContentView(view);
>
> }
> }
>
> The above code would let you add an activity to the activity group and set
> it as content to the tab. If you have to change to another activity, with
> the reference to the LocalActivityManager object, start another activity.
>
> Hope this helps.
>
> On Tue, Apr 21, 2009 at 1:34 PM, [email protected] <
>
>
>
> [email protected]> wrote:
>
> > yes i think you got it.. How does that work for example plz?
>
> > On 21 Apr., 09:19, Android Users <[email protected]> wrote:
> > > Sorry that i am re-phrasing your questions. Just want to confirm with my
> > > understanding, running more than one activity (changing from one activity
> > to
> > > another) within a tab. If that is the case then you will have to define
> > an
> > > ActivityGroup set it as the content for your tab.
>
> > > if thats what you really meant then do reply so that i can help you on
> > the
> > > same.
>
> > > On Tue, Apr 21, 2009 at 11:35 AM, [email protected] <
>
> > > [email protected]> wrote:
>
> > > > hi,
>
> > > > oh sorry but i know the api-demo and for one activity firing up an
> > > > intent worked well but i really mean a android-task! So a few
> > > > activities where sequential launched and  i would like to see all the
> > > > content views from these activities in the tab.
>
> > > > On 21 Apr., 07:54, Android Users <[email protected]> wrote:
> > > > > You mean running an activity within a tab????
>
> > > > > If so, yes you can.
>
> > > > > Ex:
>
> > > > > tabHost.addTab(tabHost.newTabSpec("Tab 1")
> > > > >                 .setIndicator("Tab 1")
> > > > >                 .setContent(new Intent(this, Tab1Data.class)
> > > > >                  .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
>
> > > > > .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) ------ use this if u need
> > the
> > > > > activity to be refreshed everytime its opened.
>
> > > > > On Tue, Apr 21, 2009 at 11:02 AM, Benny <
> > > > [email protected]>wrote:
>
> > > > > > Hi everybody,
>
> > > > > > is it possible to load a whole android-task in a single tab from
> > the
> > > > > > TabHost widget?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to