I am struggling with this issue since 1 day. I want to apply custom font(in xml i am adding as fontFamily) to a textview. And also add apply underline for specific words in that textview with hyperlink and custom color.
I tried multiple ways like HTML text with Html.fromHTML(), Custom textview with Paint(), SpannableBuilder etc. Everytime either I can apply underline with clickable link and without custom font or I can apply only custom font but not underline(In some devices like Samsung, Motorola etc devices only).
2
Answers
Finally achieved my requirement using AwsomeTextHandler-Github library.
I use SpannableStringBuilder to make part of the string Bold, Underline, Clickable, etc.
To create a link.