[android-developers] Re: Activity/Intents inTabs

2010-09-19 Thread cwgrc2
Hi Mark.  I have bought your book and re-read the "Put it on my Tab"
section several times.  I have two activities because your book
recommends using different ones to cature different grouping of
Widgets.  So my main Actvity has one page (tab) of Widgets that
collect the information and start a stopwatch, then that information
feeds into a MapActivty that is on a different tab.  Again, each tab
has many different things on them and I want to be able to freely
communicate between them.

Thanks,

Chris





On Sep 19, 8:27 am, Mark Murphy  wrote:
> 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/commonsguyhttp://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


Re: [android-developers] Re: Activity/Intents inTabs

2010-09-19 Thread Mark Murphy
On Sun, Sep 19, 2010 at 10:41 AM, cwgrc2  wrote:
> Hi Mark.  I have bought your book and re-read the "Put it on my Tab"
> section several times.  I have two activities because your book
> recommends using different ones to cature different grouping of
> Widgets.

I sure hope not. I'll need to fix that section.

I have found zero good reasons for using activities in tabs. Having
multiple activities as first-class UI components is great -- but for
tabs, I recommend just using Views.

> Again, each tab
> has many different things on them and I want to be able to freely
> communicate between them.

Which is precisely why you do *not* want those in separate Activities.

-- 
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