Join us for ⁠#Android11: The Beta Launch Show on June 3!

TextLinks.TextLinkSpan

public static abstract class TextLinks.TextLinkSpan
extends ClickableSpan

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.ClickableSpan
       ↳ androidx.textclassifier.TextLinks.TextLinkSpan


A ClickableSpan for a TextLink.

You can implement the ClickableSpan.onClick(View) function to specify the on click behavior of the span.

Summary

Public constructors

TextLinkSpan(TextLinks.TextLinkSpanData textLinkSpanData)

Public methods

final TextLinks.TextLinkSpanData getTextLinkSpanData()

Returns the data that is relevant to this span.

Inherited methods

Public constructors

TextLinkSpan

public TextLinkSpan (TextLinks.TextLinkSpanData textLinkSpanData)

Parameters
textLinkSpanData TextLinks.TextLinkSpanData

Public methods

getTextLinkSpanData

public final TextLinks.TextLinkSpanData getTextLinkSpanData ()

Returns the data that is relevant to this span.

Returns
TextLinks.TextLinkSpanData