Works like a charm. Now I just have to change all my static methods to accept a context object.
Thanks! On Mar 31, 12:39 pm, Dianne Hackborn <hack...@android.com> wrote: > You should pass the Resources object in. Actually, you should generally > pass in Context so you get the theme and everything else as well. > > > > On Tue, Mar 31, 2009 at 12:28 PM, Kirk <kirk.mora...@gmail.com> wrote: > > > I currently have a few classes that are called by an activity (some > > statically) in which I want to use a string resource. I tried: > > Resources.getSystem().getString(R.string.mystring), but am getting an > > error. It seems as though you can only use this within an activity. > > > Is there anyway to use a project resource in a standard (non Activity) > > class without having to pass the resource object from the activity > > calling the class? > > > Thanks in advance! > > > Kirk > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---