Reputation: 4322
I know how to find a resource given a certain id (e.g. getResources().getString(R.string.myString
), but if I want to get a list of all the id names, how do I do that?
Upvotes: 2
Views: 2681
Reputation: 473
it is R.resource.class.getFields()
for instance
Field[] fields = R.id.class.getFields();
for(int z = 0; z < fields.length; z++){
someArray[z] = fields[z].getInt();
}
Upvotes: 4