Added in API level 28

TextLinkSpan


class TextLinkSpan : ClickableSpan

A ClickableSpan for a TextLink.

Applies only to TextViews.

Summary

Public constructors

Public methods
TextLinks.TextLink!

open Unit
onClick(widget: View)

Inherited functions
CharacterStyle! getUnderlying()

Returns "this" for most CharacterStyles, but for CharacterStyles that were generated by wrap, returns the underlying CharacterStyle.

CharacterStyle! wrap(cs: CharacterStyle!)

A given CharacterStyle can only applied to a single region of a given Spanned. If you need to attach the same CharacterStyle to multiple regions, you can use this method to wrap it with a new object that will have the same effect but be a distinct object so that it can also be attached without conflict.

String toString()

Unit updateDrawState(ds: TextPaint)

Makes the text underlined and in the link color.

Public constructors

TextLinkSpan

Added in API level 28
TextLinkSpan(textLink: TextLinks.TextLink)
Parameters
textLink TextLinks.TextLink: This value cannot be null.

Public methods

Added in API level 28
fun getTextLink(): TextLinks.TextLink!

onClick

Added in API level 28
open fun onClick(widget: View): Unit
Parameters
widget View: This value cannot be null.