to top
Android APIs
public abstract class

ClickableSpan

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

Class Overview

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

? Examples
ClickableSpan()
Public Methods

? Examples
abstract void onClick( View widget)
Performs the click action associated with this span.

? Examples
void updateDrawState( TextPaint ds)
Makes the text underlined and in the link color.
[Expand]
Inherited Methods
From class android.text.style.CharacterStyle
From class java.lang.Object

Public Constructors

public ClickableSpan ()

Added in API level 1

Public Methods

public abstract void onClick (View widget)

Added in API level 1

Performs the click action associated with this span.

public void updateDrawState (TextPaint ds)

Added in API level 1

Makes the text underlined and in the link color.

No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.