On Wed, Jun 8, 2011 at 8:23 PM, Streets Of Boston
<[email protected]> wrote:
> If this is what you currently do:
> In your Activity, you call a method that winds up parsing some XML. Then you
> have implement an xml-handler (content-handler), that has no idea of how to
> get at the 'current activity'... And you need that activity (or at least the
> application-context associated with that activity) to get some data
> (strings, integers and such) from the resources (/res directory). Is this
> correct?

If it is, just pass the Activity into the constructor of the
ContentHandler, and get rid of the static data member/custom
Application class.

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