Android string array data source is easy to use
•
Android
In Android, using string array is a simple method to extract XML resource file data.
Examples are as follows:
Put the corresponding data into the arrays in the values folder XML file
Then, in the activity, directly use
Resources res =getResources(); String[] city=res.getStringArray(R.array.city);
It is a simple and convenient method to obtain all item data under string array name = "city".
The above is the data sorting of Android string array. We will continue to supplement relevant data in the future. Thank you for your support for this site!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码