Can we load string resources from a resource file other than strings.xml in Android?
I want to provide different resource files to users. But I don't know how to loa开发者_运维问答d strings from a resource file other than strings.xml?
String resources do not have to live in a file named strings.xml
. String resources are accessed the same way regardless of the filename: R.string.whatever
or @string/whatever
. The string resources do need to be in the res/values/
directory (or variations on that for other resource sets).
精彩评论