我想从strings.xml
调用此原始文件列表
int[] sound = {
R.raw.sound1,
R.raw.sound2,
R.raw.sound3,
R.raw.sound4,
R.raw.sound5,
};
如何键入strings.xml
并从代码中调用?
答案 0 :(得分:0)
原始文件夹声音添加到
strings.xml
文件数组中
strings.xml
<string-array name="select_sounds">
<item>@raw/sound1</item>
<item>@raw/sound2</item>
<item>@raw/sound3</item>
<item>@raw/sound4</item>
<item>@raw/sound5</item>
</string-array>