Apologies for the terrible title, but couldn't think of a better one. So I have numerous string-array's in my strings.xml file. I want to be able to reference this by passing my intent the resource id (e.g. R.array.mystringarray) as a string, and then using this string in my class to get my String[]. Here's what I have attempted so far to give you a better idea of what I'm trying
Intent intent = new Intent(Main.this, Categories.class);
intent.putExtra("category", "R.array.Categories");
startActivity(intent);
Then in Categoris.class:
myArrayID = (String) bundle.get("category");
myArray = getResources().getStringArray(myArrayID)));
Is my method even possible? Or is there another way I've overlooked. First app and still learning the ropes
EDIT - sorry, my head is fried tonight and I totally confused myself here. I have re-written the question - Converting "R.id.myID" from a String to the int value R.id.myID?