Jeffrey Blattman wrote:
> to access resource strings from android code, i can call
> getResources().getString(R.string....). however, what if i am in a class
> that doesn't extend Context? i suppose i can pass the Context in, but
> i'd rather not pollute the non-andoid classes.
> 
> is there a static accessor for resource strings?

Not that I am aware of. You need the Context to know where the resources
live, AFAIK.

You can pass in the Resources object from getResources() if you don't
want to pass in the Context for some reason.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 1.5 Programming Books: http://commonsware.com/books.html

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to