public final class ClickableSpan
extends CarSpan


A span that makes a section of text clickable.

The text of this span will be highlighted by the host, so users understand that it is interactive. If this span overlaps the other spans (for example, ForegroundCarColorSpan), the host might choose to ignore those spans if they conflict on how clickable text is highlighted.

The host may ignore ClickableSpans unless support for it is explicitly documented in the API that takes the string.

For example, to make a portion of a text clickable:

SpannableString string = new SpannableString("Text with a clickable span");
     new OnClickListener
     ), 12, 22, Spanned.SPAN_INCLUSIVE_EXCLUSIVE));


Public methods

static ClickableSpan create(OnClickListener onClickListener)

Creates a ClickableSpan from a OnClickListener.

boolean equals(Object other)
OnClickDelegate getOnClickDelegate()

Returns the OnClickDelegate associated with this span.

int hashCode()
String toString()

Inherited methods