This is a sample TextView in XML, which will properly apply the style TextContactContactName
to the TextView.
I filed a bug report on this issue. I think I got the standard reply "the shadow is not considered part of the text appearance".
http://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=35887
Ok, looks like my fault. I had made a quick test:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text styled using 'style'."
style="@style/UiTestTextView"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text styled using 'textAppearance'."
android:textAppearance="@style/UiTestTextView"
/>
and the styles-text.xml:
<style name="UiTestTextView">
<item name="android:textColor">#ff0000</item>
<item name="android:textSize">16sp</item>
<item name="android:shadowColor">#ffffff</item>
<item name="android:shadowDx">1</item>
<item name="android:shadowDy">2</item>
<item name="android:shadowRadius">3</item>
</style>
The key thing is to remember that shadow*
elements are not text properties. And as such will not be applied via textAppearance.
I'm going to ask on the Android Developers Mailing list if this is desired behavior.