Arshad Mehmood

Search the blog

    Today I Learned

    String array in XML

    android

    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>