Activity is a subclass of ApplicationContext, so in an Activity you can just use "this".
-- Zach Hobbs HelloAndroid.com Android OS news, tutorials, downloads On Thursday 10 April 2008 02:43:35 Adriano Crestani wrote: > Is there a way to get a reference to an ApplicationContext object? > Something like getContext(int id). > > I'm creating a library and I need to access a resource from the > application that is using this library. But I need a reference to this > application to call its getResources() method. > > Thanks in advance ; ) > > Adriano Crestani > --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

