I am trying to create a R.string.[variable] in a for loop to save me lots of lines of code.
I tried this, but it doesn't work
inside strings.xml, I have these
<string name="posA1">Position A 1</string>
<string name="posA2">Position A 2</string>
<string name="posA3">Position A 3</string>
...etc
main.java
for (int j=0; j<10; j++) {
...
string = R.string. + "posA" + j;
...
}
How can I do this?