# PromptVerticalListContentView.Builder

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

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/hardware/biometrics/PromptVerticalListContentView.Builder "View this page in Java")  

```
class Builder
```

|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                         ||
| ↳ | [android.hardware.biometrics.PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) |

A builder that collects arguments to be shown on the vertical list view.

## Summary

|                                                                 Public constructors                                                                 ||
|--------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#Builder())`()` <br /> |

|                                                                                                                                                                                                                                                                                                                Public methods                                                                                                                                                                                                                                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | [addListItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#addListItem(android.hardware.biometrics.PromptContentItem))`(`listItem:` `[PromptContentItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentItem)`)` Optional: Adds a list item in the current row.                                                                                                      |
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | [addListItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#addListItem(android.hardware.biometrics.PromptContentItem,%20kotlin.Int))`(`listItem:` `[PromptContentItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentItem)`, `index:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Optional: Adds a list item in the current row. |
| [PromptVerticalListContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView)                  | [build](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#build())`()` Creates a[PromptVerticalListContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView).                                                                                                                                                                                         |
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | [setDescription](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#setDescription(kotlin.String))`(`description:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Optional: Sets a description that will be shown on the content view.                                                                                                                                        |

## Public constructors

### Builder

```
Builder()
```

## Public methods

### addListItem

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

```
fun addListItem(listItem: PromptContentItem): PromptVerticalListContentView.Builder
```

Optional: Adds a list item in the current row.

|                                                                                       Parameters                                                                                        ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `listItem` | [PromptContentItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentItem):The list item view to display This value cannot be`null`. |

|                                                                                                Return                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | This builder. This value cannot be`null`. |

|                                        Exceptions                                        ||
|--------------------------------------|----------------------------------------------------|
| `java.lang.IllegalArgumentException` | If the number of list items exceeds certain limit. |

### addListItem

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

```
fun addListItem(
    listItem: PromptContentItem, 
    index: Int
): PromptVerticalListContentView.Builder
```

Optional: Adds a list item in the current row.

|                                                                                       Parameters                                                                                        ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `listItem` | [PromptContentItem](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptContentItem):The list item view to display This value cannot be`null`. |
| `index`    | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The position at which to add the item                                                            |

|                                                                                                Return                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | This builder. This value cannot be`null`. |

|                                        Exceptions                                        ||
|--------------------------------------|----------------------------------------------------|
| `java.lang.IllegalArgumentException` | If the number of list items exceeds certain limit. |

### build

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

```
fun build(): PromptVerticalListContentView
```

Creates a[PromptVerticalListContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView).

|                                                                                                                                                             Return                                                                                                                                                              ||
|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PromptVerticalListContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView) | An instance of[PromptVerticalListContentView](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView). This value cannot be`null`. |

### setDescription

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

```
fun setDescription(description: String): PromptVerticalListContentView.Builder
```

Optional: Sets a description that will be shown on the content view.

|                                                                       Parameters                                                                        ||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------|
| `description` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):The description to display. This value cannot be`null`. |

|                                                                                                Return                                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| [PromptVerticalListContentView.Builder](https://developer.android.com/reference/kotlin/android/hardware/biometrics/PromptVerticalListContentView.Builder#) | This builder. This value cannot be`null`. |