Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/view/View.OnClickListener#pubmethods)

# View.OnClickListener

*** ** * ** ***

` public static interface View.OnClickListener `   
` `

|---|
| android.view.View.OnClickListener |

Known indirect subclasses [CharacterPickerDialog](https://developer.android.com/reference/android/text/method/CharacterPickerDialog), [KeyboardView](https://developer.android.com/reference/android/inputmethodservice/KeyboardView), [QuickContactBadge](https://developer.android.com/reference/android/widget/QuickContactBadge) [CharacterPickerDialog](https://developer.android.com/reference/android/text/method/CharacterPickerDialog) Dialog for choosing accented characters related to a base character. [KeyboardView](https://developer.android.com/reference/android/inputmethodservice/KeyboardView) *This class was deprecated in API level 29. This class is deprecated because this is just a convenient UI widget class that application developers can re-implement on top of existing public APIs. If you have already depended on this class, consider copying the implementation from AOSP into your project or re-implementing a similar widget by yourselves* [QuickContactBadge](https://developer.android.com/reference/android/widget/QuickContactBadge) Widget used to show an image with the standard QuickContact badge and on-click behavior.   

*** ** * ** ***

Interface definition for a callback to be invoked when a view is clicked.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/view/View.OnClickListener#onClick(android.view.View)(https://developer.android.com/reference/android/view/View v) ` Called when a view has been clicked. |

## Public methods

### onClick

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onClick (View v)
```

Called when a view has been clicked.

<br />

| Parameters ||
|---|---|
| `v` | `View`: The view that was clicked. <br /> |