Wednesday 17 October 2012

ANDROID - String array taking from strings.xml file


String[] str1 = getResources().getStringArray(R.array.name);


String Array in strings.xml:

<string-array name="name">
        <item>Venkateswarlu</item>
        <item>Srinivasa Rao</item>
        <item>Sarswathi</item>
        <item>Nagendram</item>
        <item>Subba Rao</item>
        <item>Ramya Krishna</item>
        <item>Sudhee kumar</item>
        <item>Hari Krishna</item>
        <item>Raj kumar</item>
        <item>Ashok</item>
    </string-array>

No comments:

Post a Comment