# AccessibilityClickableSpanCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/accessibility/AccessibilityClickableSpanCompat.java+class:androidx.core.view.accessibility.AccessibilityClickableSpanCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class AccessibilityClickableSpanCompat extends ClickableSpan
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [android.text.style.CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html) |||
|   | ↳ | [android.text.style.ClickableSpan](https://developer.android.com/reference/android/text/style/ClickableSpan.html) ||
|   |   | ↳ | [androidx.core.view.accessibility.AccessibilityClickableSpanCompat](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityClickableSpanCompat) |

*** ** * ** ***

`https://developer.android.com/reference/android/text/style/ClickableSpan.html` cannot be parceled, but accessibility services need to be able to cause their callback handlers to be called. This class serves as a placeholder for the real spans. Calling onClick on these from an accessibility service will result in onClick being called on the represented span in the app process.

## Summary

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityClickableSpanCompat#onClick(android.view.View)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html unused)` Perform the click from an accessibility service. |

| ### Inherited methods |
|---|
| From [android.text.style.CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html) |---|---| | `https://developer.android.com/reference/android/text/style/CharacterStyle.html` | `https://developer.android.com/reference/android/text/style/CharacterStyle.html#getUnderlying()()` | | `static https://developer.android.com/reference/android/text/style/CharacterStyle.html` | `https://developer.android.com/reference/android/text/style/CharacterStyle.html#wrap(android.text.style.CharacterStyle)(https://developer.android.com/reference/android/text/style/CharacterStyle.html cs)` | |
| From [android.text.style.ClickableSpan](https://developer.android.com/reference/android/text/style/ClickableSpan.html) |---|---| | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/text/style/ClickableSpan.html#toString()()` | | `void` | `https://developer.android.com/reference/android/text/style/ClickableSpan.html#updateDrawState(android.text.TextPaint)(https://developer.android.com/reference/android/text/TextPaint.html ds)` | |

## Public methods

### onClick

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public void onClick(@NonNull View unused)
```

Perform the click from an accessibility service.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html unused` | This argument is required by the superclass but is unused. The real view will be determined by the AccessibilityNodeInfo. |