[android-developers] Activity/Intents inTabs

2010-09-19 Thread cwgrc2
Developers.  I am a newbie to Android but a seasoned developer in UI,
Java , and ECLIPSE.

I am trying to do something I believe is very simple yet I am
struggling.  I have two tabs, A & B.  I want to put an Activity in
each tab.  I want to have the 'B' Activity live inside 'A' so I can
access it within 'A'.  'A' has a clock and every second that passes I
need to update information in 'B', even if 'A' is not currently shown.

I put 'B' into the 2nd tab as follows:

TabSpec mapInfo=tabs.newTabSpec("tag3");
Intent intent = new Intent(this, MathleteMapActivity.class);
mapInfo.setContent(intent);
mapInfo.setIndicator("Course Map");
tabs.addTab(mapInfo);


I am totally confused on how to get the "MathleteMapActivity" Activity
from the Intent 'intent'.  There appears no way to do this.  Can
anyone please recommend a cleaner way to do this knowing what I am
trying to do?

Thanks in advance.

Chris

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Activity/Intents inTabs

2010-09-19 Thread Mark Murphy
On Sun, Sep 19, 2010 at 9:55 AM, cwgrc2  wrote:
> I have two tabs, A & B.  I want to put an Activity in
> each tab.

Why? Why not just use a single activity?

http://github.com/commonsguy/cw-android/tree/master/Fancy/Tab/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://skillsmatter.com/go/os-mobile-server

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en