[android-developers] Re: static getString()??

2009-05-05 Thread Sheado
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

[android-developers] Re: static getString()??

2009-05-05 Thread Wendal Chen
Maybe create a new Resources object will work . On May 5, 1: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() {    

[android-developers] Re: static getString()??

2009-05-05 Thread Dianne Hackborn
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

[android-developers] Re: static getString()??

2009-05-04 Thread Yogini Pimpalgaonkar
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!