# HighlightSearchResultsParams.Builder

Artifact: [androidx.photopicker:photopicker-activity](https://developer.android.com/jetpack/androidx/releases/photopicker) [View Source](https://cs.android.com/search?q=file:androidx/photopicker/activity/params/HighlightSearchResultsParams.kt+class:androidx.photopicker.activity.params.HighlightSearchResultsParams.Builder) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

*** ** * ** ***


```
class HighlightSearchResultsParams.Builder
```

<br />

*** ** * ** ***

A builder for constructing `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` object specified by this builder. |
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#setHighlightSearchTextQuery(kotlin.String)(highlightSearchTextQuery: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets the text query string used for highlighting media search results. |
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#setHighlightType(kotlin.Int)(highlightType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the requested highlight type specifying how the highlighted search results will be displayed. |

## Public constructors

### Builder

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

```
Builder()
```

## Public functions

### build

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

```
fun build(): HighlightSearchResultsParams
```

Builds the `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` object specified by this builder.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` | The newly constructed `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams` instance. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#highlightType()` is not set, or if `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder#highlightSearchTextQuery()` is not set or blank. |

### setHighlightSearchTextQuery

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

```
fun setHighlightSearchTextQuery(highlightSearchTextQuery: String): HighlightSearchResultsParams.Builder
```

Sets the text query string used for highlighting media search results. It should not be empty or null.

| Parameters |
|---|---|
| `highlightSearchTextQuery: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Input string query for highlighting media results. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder` | This Builder. |

### setHighlightType

Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

```
fun setHighlightType(highlightType: Int): HighlightSearchResultsParams.Builder
```

Sets the requested highlight type specifying how the highlighted search results will be displayed.

| Parameters |
|---|---|
| `highlightType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A supported highlight type from `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightType.Companion.HighlightType`. Value is one of the following: - `0` - `1` <br /> |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/HighlightSearchResultsParams.Builder` | This Builder. |