FillableData


Represents a single piece of data for autofill purposes.

An instance of FillableData is expected to hold a value of a single specific type. Consumers can use the corresponding property to retrieve the value. For any given instance, only the property that matches the underlying data's type will return a non-null value. All other properties will return null.

Summary

Public functions

open Int
getListIndexOrDefault(defaultValue: Int)

Returns the list index value if it is available, otherwise returns the defaultValue.

Cmn

Public properties

open Boolean?

The Boolean representation of the data, or null if none is available.

Cmn
open Int?

The Int (integer) representation of the data, or null if none is available.

Cmn
open CharSequence?

The CharSequence (text) representation of the data, or null if none is available.

Cmn

Extension functions

AutofillValue?

Retrieves the underlying platform AutofillValue from the FillableData.

android

Public functions

getListIndexOrDefault

open fun getListIndexOrDefault(defaultValue: Int): Int

Returns the list index value if it is available, otherwise returns the defaultValue.

Public properties

booleanValue

open val booleanValueBoolean?

The Boolean representation of the data, or null if none is available.

listIndexValue

open val listIndexValueInt?

The Int (integer) representation of the data, or null if none is available.

textValue

open val textValueCharSequence?

The CharSequence (text) representation of the data, or null if none is available.

Extension functions

toAutofillValue

fun FillableData.toAutofillValue(): AutofillValue?

Retrieves the underlying platform AutofillValue from the FillableData.

Returns
AutofillValue?

The platform AutofillValue, or null if the FillableData is not an instance of AndroidFillableData or the platform version is lower than Build.VERSION_CODES.O.