开发者

Strings in strings.xml are causing problems in Android

What can I do? I want to offer multilanguage versions, but for this I need every string in strings.xml...with Con开发者_JAVA技巧text.getString it isn't working because of non-static method in static class/method.

Strings in strings.xml are causing problems in Android

Strings in strings.xml are causing problems in Android


Then do this:

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜