I would like to know how to create an array of strings inside strings.xml, and how to access it in java code. I need this in order to use the setText(). Please help.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
closed as off-topic by Pankaj Kumar, Uwe Plonus, nsgulliver, falsetru, Guillaume Jul 24 '13 at 12:04This question appears to be off-topic. The users who voted to close gave this specific reason:
|
|||
|
strings.xml
In your activity class.
Source @ http://developer.android.com/guide/topics/resources/string-resource.html#StringArray Edit:
Then
use |
|||||||||
|
You create a String array in strings.xml like such:
And then you can access it with the following:
|
|||||||||
|