I have a textview that I set its style to a style I made with a shadow. I declared the settings I want in the style.xml InfoTextstyle
and set the textview style to the style but it doesn't work.
This is the style.xml:
<style name="InfoTextStyle" parent="AppBaseTheme">
<item name="android:textColor">#fff</item> <- works
<item name="android:textSize">18sp</item> <- works
<item name="android:shadowColor">#ff0000</item> <- don't works*
<item name="android:shadowRadius">5.0</item> <- *
<item name="android:shadowDx">2.0</item> <- *
<item name="android:shadowDy">2.0</item> <- *
</style>
& this is the activity_main.xml:
<TextView
android:id="@+id/brightness"
style="@style/InfoTextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="15dp"
android:text="@string/brightness"
android:textAppearance="?android:attr/textAppearanceMedium" />
I'm new to android, so I'm not sure what's the problem.