You can't. Pass a Context or Resources object into the function. On Mon, May 4, 2009 at 10:59 PM, Sheado <chad...@gmail.com> wrote:
> > Thanks for the quick reply Yogini.. > > unfortunately that doesn't work.. I'm trying to access the string > resource from a static method: > > public static void blah() > { > getResources().getString() // doesn't work > } > > I also tried Resources.getSystem().getString() with no luck.. but I > guess I should've expected that. > > Any other suggestions? > > Thanks! > > On May 4, 10:40 pm, Yogini Pimpalgaonkar <yogin...@gmail.com> wrote: > > getResources().getString(R.string.unknown_num) > > > > On Tue, May 5, 2009 at 11:06 AM, Sheado <chad...@gmail.com> wrote: > > > > > hello, > > > > > anybody know if there's anyway way I to access the String values of > > > String resources statically? > > > e.g. a static equivalent of Context.getString(...)? > > > > > thanky in advance! > > > -- 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, and so won't reply to such e-mails. 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 -~----------~----~----~----~------~----~------~--~---