Android – Underline text in TextView

By -
How to underline text in TextView?
Solution:
SpannableString contentUnderline = new SpannableString("https://technotalkative.com/");
contentUnderline.setSpan(new UnderlineSpan(), 0, contentUnderline.length(), 0);

TextView mPage = (TextView) findViewById(R.id.page);
mPage.setText(contentUnderline);

CEO & Co-Founder at SolGuruz® | Organiser @ GDG Ahmedabad | Top 0.1% over StackOverflow | 15+ years experienced Tech Consultant | Helping startups with Custom Software Development

Loading Facebook Comments ...
Loading Disqus Comments ...