0

我想调用这个原始文件列表strings.xml

int[] sound = {

    R.raw.sound1,
    R.raw.sound2,
    R.raw.sound3,
    R.raw.sound4,
    R.raw.sound5,
};

如何输入 astrings.xml并从代码中调用?

4

1 回答 1

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>
于 2019-03-28T04:38:33.913 回答