0

I want to call this list of raw file from strings.xml

int[] sound = {

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

How to type in a strings.xml and call from code ?

Md. Sabbir Ahmed
  • 850
  • 8
  • 22
  • did u meant getting this string array from Strings.xml ? if so, kindly check https://stackoverflow.com/questions/4161256/referencing-a-string-in-a-string-array-resource-with-xml – Solaiman Hossain Mar 28 '19 at 04:12

1 Answers1

0

raw folder sound in add to strings.xml file array

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>
Kishan Viramgama
  • 893
  • 1
  • 11
  • 23