Wednesday, June 8, 2011

[android-developers] Re: noob Q :-/ regarding global variable - declared the application class but...

Well I used Application because I thought it would be easily
accessible...but it's not.

If I declare for example a static variable in my Activity class, I
will still have trouble accessing it since the handler for XML is not
being called by me, in that case I would just pass the variable, but I
provide myXMLHandler class as a handler to XMLReader object. Then when
this XMLReader object is going to parse the XML it uses myXMLHandler
and in myXMLHandler I have no access to variables in Activity class,
static or not. Am I making sense? :D

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment