How to set underline text on textview?

The Solution to How to set underline text on textview? is


You have to use SpannableString for that :

String mystring=new String("Hello.....");
SpannableString content = new SpannableString(mystring);
content.setSpan(new UnderlineSpan(), 0, mystring.length(), 0);
yourtextview.setText(content);

Update : You can refer my answer on Underling TextView's here in all possible ways.

~ Answered on 2011-04-13 07:30:30


Most Viewed Questions: