Builder
class Builder
| kotlin.Any | |
| ↳ | android.service.autofill.Field.Builder |
A builder for Field
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| Field |
build()Builds the instance. |
| Field.Builder |
Regex used to determine if the dataset should be shown in the autofill UI; when |
| Field.Builder |
setPresentations(value: Presentations)The presentations used to visualize this field in Autofill UI. |
| Field.Builder |
setValue(value: AutofillValue)The value to be autofilled. |
Public constructors
Public methods
build
fun build(): Field
Builds the instance. This builder should not be touched after calling this!
| Return | |
|---|---|
Field |
This value cannot be null. |
setFilter
fun setFilter(value: Pattern?): Field.Builder
Regex used to determine if the dataset should be shown in the autofill UI; when null, it disables filtering on that dataset (this is the recommended approach when value is not null and field contains sensitive data such as passwords).
| Parameters | |
|---|---|
value |
Pattern?: This value may be null. |
setPresentations
fun setPresentations(value: Presentations): Field.Builder
The presentations used to visualize this field in Autofill UI.
| Parameters | |
|---|---|
value |
Presentations: This value cannot be null. |
| Return | |
|---|---|
Field.Builder |
This value cannot be null. |
setValue
fun setValue(value: AutofillValue): Field.Builder
The value to be autofilled. Pass null if you do not have the value but the target view is a logical part of the dataset. For example, if the dataset needs authentication and you have no access to the value.
| Parameters | |
|---|---|
value |
AutofillValue: This value cannot be null. |