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

# SearchView.OnSuggestionListener

*** ** * ** ***

` public static interface SearchView.OnSuggestionListener `   
` `

|---|
| android.widget.SearchView.OnSuggestionListener |

<br />

*** ** * ** ***

Callback interface for selection events on suggestions. These callbacks are only relevant when a SearchableInfo has been specified by `https://developer.android.com/reference/android/widget/SearchView#setSearchableInfo(android.app.SearchableInfo)`.

## Summary

| ### Public methods ||
|---|---|
| ` abstract boolean` | ` https://developer.android.com/reference/android/widget/SearchView.OnSuggestionListener#onSuggestionClick(int)(int position) ` Called when a suggestion was clicked. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/widget/SearchView.OnSuggestionListener#onSuggestionSelect(int)(int position) ` Called when a suggestion was selected by navigating to it. |

## Public methods

### onSuggestionClick

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

```
public abstract boolean onSuggestionClick (int position)
```

Called when a suggestion was clicked.

<br />

| Parameters ||
|---|---|
| `position` | `int`: the absolute position of the clicked item in the list of suggestions. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the listener handles the event and wants to override the default behavior of launching any intent or submitting a search query specified on that item. Return false otherwise. <br /> |

### onSuggestionSelect

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

```
public abstract boolean onSuggestionSelect (int position)
```

Called when a suggestion was selected by navigating to it.

<br />

| Parameters ||
|---|---|
| `position` | `int`: the absolute position in the list of suggestions. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the listener handles the event and wants to override the default behavior of possibly rewriting the query based on the selected item, false otherwise. <br /> |