public class LinkSpan extends ClickableSpan
LinkSpan.OnClickListener
in your
context (typically your Activity).
Note on accessibility: For TalkBack to be able to traverse and interact with the links, you
should use LinkAccessibilityHelper
in your TextView
subclass. Optionally you can
also use RichTextView
, which includes link support.Modifier and Type | Class and Description |
---|---|
static interface |
LinkSpan.OnClickListener |
Modifier and Type | Method and Description |
---|---|
String |
getId() |
void |
onClick(View view)
Performs the click action associated with this span.
|
void |
updateDrawState(TextPaint drawState)
Makes the text underlined and in the link color.
|
getUnderlying, wrap
public LinkSpan(String id)
public void onClick(View view)
ClickableSpan
onClick
in class ClickableSpan
public void updateDrawState(TextPaint drawState)
ClickableSpan
updateDrawState
in class ClickableSpan
public String getId()