On Wed, Jun 8, 2011 at 7:34 PM, Duskox <dus...@gmail.com> wrote:
> so here I am again with a problem. I have declared a class that
> extends Application class and in there I have some variables that I
> want to access from wherever I am. But, the problem is that I have
> several classes that I use but are not extending the Activity class so
> I can not do this.getApplication() as there is no such function. I
> tried to simply implement Application class in those classes but that
> seemed to easy and did not work, but I had to try it out.

Why use Application, instead of static data members?

> From my main View class I call a function for parsing an XML file.
> This function is in myXMLHandler class that extends DefaultHandler
> class. In there, I want to add everything I read to an array that is
> in my Application class, but I don't know a way to get to it??

Why use Application, instead of static data members?

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

Android 3.0 Programming Books: http://commonsware.com/books

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

Reply via email to