I would like to access complex resources ("total resources") compiled into my apk. For example, getting all the attributes of the current topic, preferably as xml, I can cross.
Themes / styles can be obtained using getStyledAttributes (), but this requires knowledge of the attributes in advance. Is there a way to get a list of attributes that exist in a style?
For example, in a topic like this:
<style name="BrowserTheme" parent="@android:Theme.Black"> <item name="android:windowBackground">@color/white</item> <item name="android:colorBackground">#FFFFFFFF</item> <item name="android:windowNoTitle">true</item> <item name="android:windowContentOverlay">@null</item> </style>
How can I access the elements without knowing their names in advance?
Another example would be attrs.xml, where some attributes have enumerations or flags, for example:
<attr name="configChanges"> <flag name="mcc" value="0x00000001" /> <flag name="mnc" value="0x00000002" /> ... </attr>
How can an application receive these flags without knowing their name?
source share