Skip to content

Most visited

Recently visited

navigation

ClickableSpan

public abstract class ClickableSpan
extends CharacterStyle implements UpdateAppearance

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.ClickableSpan
Known Direct Subclasses


If an object of this type is attached to the text of a TextView with a movement method of LinkMovementMethod, the affected spans of text can be selected. If clicked, the onClick(View) method will be called.

Summary

Public constructors

ClickableSpan()

Public methods

abstract void onClick(View widget)

Performs the click action associated with this span.

void updateDrawState(TextPaint ds)

Makes the text underlined and in the link color.

Inherited methods

From class android.text.style.CharacterStyle
From class java.lang.Object

Public constructors

ClickableSpan

Added in API level 1
ClickableSpan ()

Public methods

onClick

Added in API level 1
void onClick (View widget)

Performs the click action associated with this span.

Parameters
widget View

updateDrawState

Added in API level 1
void updateDrawState (TextPaint ds)

Makes the text underlined and in the link color.

Parameters
ds TextPaint
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.