Here's my story:
I got a custom ViewGroup that I want to create from code using a predefined style, my approach so far has been creating an AttributeSet object from a style.xml element, like so (warning, beware of the copy-paste code ahead):
XmlPullParser parser = getResources().getXml(R.style.my_stylez);
AttributeSet attributes = Xml.asAttributeSet(parser);
But when doing so I get some crazy error: "..android.content.res.Resources$NotFoundException: Resource ID #0x7f090002 type #0x12 is not valid"
I'm know I'm probably missing something very obvious here (or am I?), and would be grateful if any of you guys can point me in the right direction.
Thanks