On Mon, May 16, 2011 at 7:37 PM, elioncho <[email protected]> wrote: > I have an AsyncTask (in a separate file) which is invoked on an > activity. When I instantiate the AsyncTask, I send the activity as a > param. How can I access the acitivity's instance variables from the > onPostExecute method of the AsyncTask?
Make the instance variables package-protected, and put both classes in the same package. Or, more cleanly, implement getter/setter methods on the activity that the AsyncTask can use. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2 -- 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

