in my application, I am making a web request that returns some result code, for example. 105. I have string resources that look like this.
<string name="r105">O.K.</string>
<string name="r106">Something went wrong.</string>
<string name="r333">Fatal error.</string>
Now i want to do something like this
Toast.makeText(parent.getApplicationContext(),
parent.getString(R.string.r+resultCode), Toast.LENGTH_LONG).show();
and r+resultCode- resource identifier.
This does not work. Any idea how to do this?
source
share