On Tue, Oct 19, 2010 at 4:39 AM, pscheven <[email protected]> wrote:
> In my Android application, I have to call the getSharedPreferences in > non-activity classes. > > In order to avoid passing a Context object to each constructor of these > classes (and because many of them are classes with only static methods which > don't have a constructor) > Pass the context or SharedPreferences object itself to the functions that need it. No need to do any of this crazy static activity reference stuff. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- 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

