Arshad Mehmood

Search the blog

    String array in XML

    android1 min read

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

    <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>