【发布时间】:2013-11-16 04:29:46
【问题描述】:
我是beginner Android Developer。
我想了解如何访问 string array out of string.xml 并使用它。
我从里到外搜索了互联网,一无所获。
我找到了立即将其放入文本视图的方法,但这不是我想要做的。所以,基本上,我想把string array into another array。
string.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="Solar System">
<item>Sun</item>
<item>Mercury</item>
<item>Venus</item>
<item>Earth</item>
<item>Mars</item>
<item>Jupiter</item>
<item>Saturn</item>
<item>Uranus</item>
<item>Neptune</item>
所以我想把这个xml字符串数组变成java字符串数组
感谢您的积极帮助, 对不起,我认为你们许多人展示的这种方式行不通。这只是我的程序中的另一个错误。
-谢谢
【问题讨论】:
-
两个答案都是正确的,如果有帮助请检查并接受。
-
I searched the internet inside out and found nothing。真的吗?你搜索了什么?独角兽食物?这是一个教程。 bit.ly/1d4sEcJ
标签: java android xml arrays string