Google 致力于为黑人社区推动种族平等。查看具体举措

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