I ma making a game, and I want to pull the apprpriate dialog from the resource file, but which string to pull changes from level to level.
How would I get this to work?
I would want something like:
int level = 3;
String dialog = getResources().getString(R.string.["level_dialog_"+level]);
With the goal being that the apprpriate string resource ID is found using the name of the string resource plus the level. But of course that won't even compile.
What is the right way to do this?