How-to-underline-textview-in-android

  • SumoMe

If you want to underline TextView in Android you can use this code:

        SpannableString contentUnderline = new SpannableString("some text here");
        contentUnderline.setSpan(new UnderlineSpan(), 0, contentUnderline.length(), 0);
        TextView TextViewCopyright = (TextView) findViewById(R.id.TextView01);
        TextViewCopyright.setText(contentUnderline);


Special thanks to Eli.

1 thought on “How-to-underline-textview-in-android”

Leave a Reply


*