0

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.

Acces to the String

Can't acces because of int

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
Liam Schnell
  • 474
  • 8
  • 25
  • 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 Answers2

0

Then do this:

How can I get a resource content from a static context?

Community
  • 1
  • 1
Cristian
  • 198,401
  • 62
  • 356
  • 264
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);

Get String Resource

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