What can I do? I want to offer multilanguage versions, but for this I need every string in strings.xml...with Context.getString it isn't working because of non-static method in static class/method.
Asked
Active
Viewed 377 times
0
-
Your first image hasn't loaded? Ignore the R file, that is automatically generated. Show us the compile error in the code :D – Blundell Mar 15 '11 at 16:41
2 Answers
0
Then do this:
0
Oh I see what your trying to do.
The R.string.blah is just an int reference.
To get the actual string you need to do
Context.getResources().getString(R.string.blah);

Blundell
- 75,855
- 30
- 208
- 233
-
Ah right didn't see that was what you wanted. Could of always just instantiated your strings in the constructor and passed in the context. Same thing end of the day. – Blundell Mar 15 '11 at 19:00