# AccessibilityClickableSpanCompat

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityClickableSpanCompat "View this page in Java")

<br />

```
class AccessibilityClickableSpanCompat : ClickableSpan
```

<br />

|---|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.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/kotlin/androidx/core/view/accessibility/AccessibilityClickableSpanCompat) |

*** ** * ** ***

[ClickableSpan](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 functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onClick](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityClickableSpanCompat#onClick(android.view.View))`(unused: `[View](https://developer.android.com/reference/android/view/View.html)`)` Perform the click from an accessibility service. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.text.style.CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html) |-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html)`!`               | [getUnderlying](https://developer.android.com/reference/android/text/style/CharacterStyle.html#getUnderlying())`()`                                                                                                                       | | `java-static `[CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html)`!` | [wrap](https://developer.android.com/reference/android/text/style/CharacterStyle.html#wrap(android.text.style.CharacterStyle))`(cs: `[CharacterStyle](https://developer.android.com/reference/android/text/style/CharacterStyle.html)`!)` | |
| From[android.text.style.ClickableSpan](https://developer.android.com/reference/android/text/style/ClickableSpan.html) |--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [toString](https://developer.android.com/reference/android/text/style/ClickableSpan.html#toString())`()`                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)        | [updateDrawState](https://developer.android.com/reference/android/text/style/ClickableSpan.html#updateDrawState(android.text.TextPaint))`(ds: `[TextPaint](https://developer.android.com/reference/android/text/TextPaint.html)`!)` |                                                                                                            |

## Public functions

### onClick

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

```
fun onClick(unused: View): Unit
```

Perform the click from an accessibility service.  

|                                    Parameters                                    |
|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| `unused: `[View](https://developer.android.com/reference/android/view/View.html) | This argument is required by the superclass but is unused. The real view will be determined by the AccessibilityNodeInfo. |