Underlining text in TextView
As we all know there is a property called android:textStyle to set text as Bold and Italic. But it doesn’t have any value like underline. What if we want underlined text in android?
1st Approach
1 2 3 4 |
String data="Underlined Text"; SpannableString content = new SpannableString(data); content.setSpan(new UnderlineSpan(), 0, data.length(), 0); textView.setText(content); |