# SearchHeader

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/SearchHeader.java+class:androidx.car.app.model.SearchHeader) Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

*** ** * ** ***


```
@CarProtocol
@ExperimentalCarApi
@RequiresCarApi(value = 9)
class SearchHeader
```

<br />

*** ** * ** ***

Represents a search bar header. This can be added to a `https://developer.android.com/reference/kotlin/androidx/car/app/model/SectionedItemTemplate` to support search functionality.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/car/app/model/Action!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#getEndHeaderActions()()` Returns the list of actions displayed at the end of the search header. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#getInitialSearchText()()` Returns the initial search text or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchCallbackDelegate` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#getSearchCallbackDelegate()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchCallbackDelegate` for search callbacks. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#getSearchHint()()` Returns the search hint or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#getStartHeaderAction()()` Returns the action displayed at the start of the search header or `null` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#isShowKeyboardByDefault()()` Returns whether the keyboard should be displayed by default. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchHeader#toString()()` |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getEndHeaderActions

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getEndHeaderActions(): (Mutable)List<Action!>
```

Returns the list of actions displayed at the end of the search header.

### getInitialSearchText

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getInitialSearchText(): String?
```

Returns the initial search text or `null` if not set.

### getSearchCallbackDelegate

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getSearchCallbackDelegate(): SearchCallbackDelegate
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/SearchCallbackDelegate` for search callbacks.

### getSearchHint

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getSearchHint(): String?
```

Returns the search hint or `null` if not set.

### getStartHeaderAction

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun getStartHeaderAction(): Action?
```

Returns the action displayed at the start of the search header or `null` if not set.

### hashCode

```
fun hashCode(): Int
```

### isShowKeyboardByDefault

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun isShowKeyboardByDefault(): Boolean
```

Returns whether the keyboard should be displayed by default.

### toString

```
fun toString(): String
```