OK, found a working solution - no idea if it was indented that way,
SDK documentation is very fuzzy and incomplete in this area...

To stay with my example:
In attrs.xml, define the "CSS class" ;):
<resources>
        <attr name="headline" format="reference" />
</resources>

In styles.xml, define the style to use for each theme:
<style name="Theme.Android.Black" parent="android:Theme.Black">
        <item name="android:textViewStyle">@style/textForBlack</item>
        <item name="headline">@style/headlineForBlack</item>
</style>
<style name="Theme.Android.Light" parent="android:Theme.Light">
        <item name="android:textViewStyle">@style/textForLight</item>
        <item name="headline">@style/headlineForWhite</item>
</style>

In the layout, refer to the attribute with "?":
<TextView ..... style="?headline" />

Hope this helps other people with similar problems...

On a related topic: Does anybody have an idea how to support themes
from external (ZIP?) files including the required drawables? Or, in
other words, user skins.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to