On Sat, Aug 21, 2010 at 11:12 PM, Doug Gordon <[email protected]> wrote:
> Am I correct that this is the only way to do this?

Yes.

> Also, if I want to
> use any other Android class that requires a context (e.g.
> AlertDialog.Builder), I essentially have to "pass" the context from
> the main Activity object to any class that needs to use it?

Yes. The more you find that you are doing this, the more you have
over-engineered your object model, IMHO.

> I guess my main question is whether there's another way to get the
> Context without having to pass it from class to class as an argument.

No, sorry.

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

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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