hi,
I was going through the code for Activity.java and ApplicationContext.
Both these classes define many functions of Context Interface. Take
for example startActivity.java
Activity Class has its own implementation of startActivity
ApplicationContext class also has an implemenetaion of startActivity.
Now there are 2 observations...
Observation 1: Regarding ApplicationContext.java
====================
/**
* Common implementation of Context API, which Activity and other
application
* classes inherit.
*/
@SuppressWarnings({"EmptyCatchBlock"})
class ApplicationContext extends Context {
===================================
So the comments imply that Activity class should actually use
ApplicaitonContext.java. Infact Activity Class should inherit
ApplicationContext class.
Observation 2: Regarding Activity.java
But if you look at class Hierarchy of Activity class, it goes as:
Context ==> ContextWrapper ==> ContextThemeWrapper ==> Activity
So nowhere do I find ApplicationContext.
Questions:
1. Who uses ApplicationContext class?
2. Does Activity class ever deal with ApplicationContext class (as
given in the javadoc comments of ApplicationContext.java).
Thanks,
Amit
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---