开发者

Can we load string resources from a resource file other than strings.xml in Android?

开发者 https://www.devze.com 2023-01-19 22:56 出处:网络
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 nam

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).

0

精彩评论

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