-
Notifications
You must be signed in to change notification settings - Fork 37
enhancement: better interop with theme attributes #30
Comments
I don’t think themes can be applied programmatically :( However I’ve never been able to use them effectively — personally I find the whole theme XML API (inheritance, composition, namespacing) very confusing. On the other hand, for many cases styling with tweaks works rather well. |
Actually themes, is just mixed in attribute sets that is passed to views as constructor parameters. This could be done in the code, the process is not much different from supplying a bundle to the Intent, from code standpoint, although I'm not sure how you could convert existing That I'm doing to bypass this limitation without much code (and due to my project is pretty big and complex, with huge legacy), is that I'm just using xml as usual, and then wire views using either |
AFAIK there is no way to create Yeah, not using the |
Looking at the documentation, this example exists: XmlPullParser parser = resources.getXml(myResouce);
AttributeSet attributes = Xml.asAttributeSet(parser); Given that |
Even more from docs: |
This is interesting — we could write an implementation of |
this is a downside of moving away from xml, that the xml conveniences such as theme attributes become unavailable. I don't know a good way to handle this yet
The text was updated successfully, but these errors were encountered: