I want to make a TextView
's content bold, italic and underlined. I tried the following code and it works, but doesn't underline.
<Textview android:textStyle="bold|italic" ..
How do I do it? Any quick ideas?
androidtext-stylingtextview
I want to make a TextView
's content bold, italic and underlined. I tried the following code and it works, but doesn't underline.
<Textview android:textStyle="bold|italic" ..
How do I do it? Any quick ideas?
Best Answer
This should make your TextView bold, underlined and italic at the same time.
strings.xml
To set this String to your TextView, do this in your main.xml
or In JAVA,
Sometimes the above approach will not be helpful when you might have to use Dynamic Text. So in that case SpannableString comes into action.
OUTPUT