We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spanner.append("google", url("http://www.google.lt"), noUnderline())
The text was updated successfully, but these errors were encountered:
overriding the updateDrawState () in ClickableSpan, you can simply remove the underline.
updateDrawState ()
ClickableSpan
code like this:
class ClickSpanBuilder(private val clickListener: OnClickListener) : SpanBuilder { override fun build(): Any { return EasyClickableSpan(this.clickListener) } private class EasyClickableSpan(private val clickListener: OnClickListener) : ClickableSpan() { override fun onClick(widget: View) { this.clickListener.onClick(widget) } override fun updateDrawState(ds: TextPaint) { super.updateDrawState(ds) // it's key to remove underline ds.isUnderlineText = false } } }
If it is url, just inherit URLSpan and then the same as the above way.
url
URLSpan
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: