I have a list of string arrays:
<string-array name="chapter_1">
<item>......</item>
.
.
.
.
</string-array>
<string-array name="chapter_2">
<item>......</item>
.
.
.
.
</string-array>
and so on. I have got a random int chapter_no.
I have a string:
String chapter_name = "chapter_" + chapter_no;
Now, I want to access string array corresponding to the chapter_no.
I know that I can't do like this:
String[] chapter = getResources().getStringArray(R.array.chapter_name);
How can I access the string arrays randomly? Please help me.