Reputation: 61
I would like to know if it is possible to recognize, if id is from drawable
or strings
resource.
For example:
If I call R.strings.hello
that return int
value `2131099681.
Can i recognize that the id is from strings folder?
Upvotes: 1
Views: 603
Reputation: 220
I guess you could use (in activity)
getResources().getResourceTypeName(int resid);
As suggested here
Upvotes: 1