Hello guys I need to refer my items in RES > values > strings.xml and get the value of them. These items are with name: cd_1, 2... What I want? I want to get all items values programmatically using R.string.cd_x where X is the value I want to replace in for loop to get the item value. Is there a way to do this?
Below Is what I'm trying(Where y is a number...could be 8, 9, 10...):
for(int i = 1; i<y; i++){
title = "cd_"+String.valueOf(i);
title_id = Resources.getSystem().getIdentifier(title, "string", package_name);
title= Resources.getSystem().getString(title_id);
addTitle(new Title(i, title));
}