I'd like to reference a string-array from another string-array in the strings.xml. If I try to read the string-array (named "plants") in my activity the value of every item is null.
Is there a possibility to get these values?
Here is the part of the strings.xml:
<string name="Orlaya_grandiflora_1">Orlaya grandiflora</string>
<string name="Orlaya_grandiflora_2">Large-Flowered Orlaya</string>
<string name="Orlaya_grandiflora_3">Apiaceae</string>
<string-array name="Orlaya_grandiflora">
<item>@string/Orlaya_grandiflora_1</item>
<item>@string/Orlaya_grandiflora_2</item>
<item>@string/Orlaya_grandiflora_3</item>
</string-array>
<string-array name="plants">
<item>@array/Ginkgo_biloba</item>
<item>@array/Capsicum_frutescens</item>
<item>@array/Viscum_album</item>
<item>@array/Orlaya_grandiflora</item>
</string-array>
I try to access the values like this, for example:
String[] plantArray = resources.getStringArray(R.array.plants);
for (String plant : plantArray) {
System.out.println("--> " + plant);
}
The values of plant is in every case "null"
Anybody knows how to access the values?
