Skip to content
Karol Wrótniak edited this page Jan 4, 2019 · 4 revisions

Arrays

Look at http://developer.android.com/guide/topics/resources/string-resource.html#StringArray In a CSV/XLS(X) square brackets at the end of a name mean that is an array, not a single string. E.g. the following CSV part:

planets_array[],Mercury
planets_array[],Venus

Should produce the following XML:

<string-array name="planets_array">
        <item>Mercury</item>
        <item>Venus</item>
</string-array>

Example of usage:

Resources res = getResources();
String[] planets = res.getStringArray(R.array.planets_array);

Note that given array in all translations should be equal-sized.

Clone this wiki locally