Tuesday 12 February 2013

Create String array in strings.xml file and Retrive in Activity ?

Creating:

    <string-array name="Android">
        <item>Android Books</item>
        <item>Android Software</item>
        <item>Android Images</item>
        <item>Android Tutorials</item>
        <item>Android Games</item>
        <item>Android Mobiles</item>
    </string-array>


Retriving:

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


 

No comments:

Post a Comment