# String array in XML

> You can create an array in strings.xml file or any other xml file (arrays.xml?) like this:

- Canonical: https://preview.arshadmehmood.com/today-i-learned/android/string-array-in-xml/
- Section: android
- Author: Arshad Mehmood

You can create an array in `strings.xml` file or any other xml file *(arrays.xml?)* like this:

```xml
<resources>
    <string-array name="listArray">
        <item>Headings</item>
        <item>Headings and Details</item>
        <item>All Data</item>
    </string-array>
    <string-array name="listValues">
        <item>1</item>
        <item>2</item>
        <item>3</item>
    </string-array>
</resources>
```

