Below is the simple xml snippet for which android:textStyle="italic"
is not applying.
If I remove android:textStyle="italic
the text will appear.
<TextView
android:text="row one"
android:textSize="15pt"
android:typeface="serif"
android:textStyle="italic"
android:textColor="#00abcd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
In the above android:textStyle="italic"
is working only for android:typeface="serif"
, if I change the typeface to sans, monospace or normal the android:text
is not displaying.
Why is that?
try making text italic through strings file it is alternative to this might help you
example
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Row_one"><i>Row one</i></string>
<string name="Row_two"><i>Row two</i></string>
</resources>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With