I have many string elements in my res/values/strings.xml
So, I want one method getString(String abc)
for retrieving the strings from strings.xml
:
public String getString(String abc){ // abc = address1
String result;
result = context.getResources().getString(R.strings.+abc);
}
How to access the string elements in this method based on a String in argument?