Last active
October 24, 2016 05:20
-
-
Save arthtilva/899b476fae2ecd31f8eb0cca3c69bceb to your computer and use it in GitHub Desktop.
Underline Text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String data = "Forgot Password?"; | |
SpannableString content = new SpannableString(data); | |
content.setSpan(new UnderlineSpan(), 0, data.length(), 0); | |
.setText(content); | |
//====================// | |
String data="Underlined Text"; | |
textView.setPaintFlags(textView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); | |
textView.setText(data); | |
//====================// | |
String htmlData="<u>Underlined Text</u>"; | |
textView.setText(Html.fromHtml(htmlData)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment