You can get the resource name as shown here: https://stackoverflow.com/a/10138018/1489968
But unfortunately getResourceEntryName(R.layout.xzy) is returning xyz and getResourceName(R.layout.xzy) is returning package:layout/xyz.
Is there any function that returns the active configuration qualifier for a given resource id using the best match algorithm?
For my test I need the following information:
- resource type (e.g.
layout) - active configuration qualifier (e.g.
-v21) - (or better both of them combined like
layout-v21) - resource identifier (e.g.
xyz)
I found Resources.getConfiguration() that seem to give me a configuration. But I can't figure out a way to get the selector for a given id.