Justin Anderson wrote:
> Shoot... I was kinda hoping they were in different parts of your code. 
> I'm going to have to punt this one off to someone else...

Since I'm being moderated (courtesy of a spammer forging my email
address, apparently), this message probably will show up a day late and
a euro short.

There is little reason anywhere to use getApplicationContext(). Activity
is a Context. Service is a Context. BroadcastReceivers get passed a
Context in onReceive(). And so on.

As to why the difference in behavior, my guess is that since Toasts live
outside any Activity, any sort of Context can be used to create them,
but Dialogs are more intrinsically tied to an Activity. Now, if that is
the case, it'd've been nice to actually make it be that way in the
parameters (take an Activity rather than a generic Context).

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

_Android Programming Tutorials_ Version 1.0 Available!

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

Reply via email to