I'm practicing my Java and I'm trying to make something like simple text game. Now there are two main characters and each one have their own pop up text. I've put the text in string.xml with their own names like "dialog1" "dialog2" "dialog3" and I want to retrieve the strings with R.string.dialog* but I want to make some function to change numbers something like "dialog" + int
How to make something like this??
I made it like if you tap on screeny the its displayed "dialog1" massage when you tap second time the other character should display next part "dialog2". Now I don't want to do it manually r.string.dialog1 then r.string.dialog2 I want to make function of this but I don't know how to pass value "dialog" + int.