FillableData.Companion


Summary

Extension functions

FillableData?

Creates a FillableData from the platform AutofillValue type.

android
FillableData?

Creates a FillableData instance from a Boolean.

Cmn
android
FillableData?

Creates a FillableData instance from a Long.

Cmn
android
FillableData?

Creates a FillableData instance from an Int.

Cmn
android
FillableData?

Creates a FillableData instance from a CharSequence.

Cmn
android

Extension functions

createFromAutofillValue

fun FillableData.Companion.createFromAutofillValue(
    autofillValue: AutofillValue
): FillableData?

Creates a FillableData from the platform AutofillValue type.

Parameters
autofillValue: AutofillValue

The platform autofill value to create the FillableData from.

Returns
FillableData?

A FillableData object containing the platform autofill data, or null if the platform version is lower than Build.VERSION_CODES.O.

createFromBoolean

fun FillableData.Companion.createFromBoolean(booleanValue: Boolean): FillableData?

Creates a FillableData instance from a Boolean.

This function is used to wrap a boolean value for autofill purposes, such as the state of a checkbox or a switch.

Parameters
booleanValue: Boolean

The boolean data to be used for autofill.

Returns
FillableData?

A FillableData object containing the boolean data, or null if the platform does not support autofill.

createFromDateMillis

fun FillableData.Companion.createFromDateMillis(dateMillisValue: Long): FillableData?

Creates a FillableData instance from a Long.

This function is used to wrap a long value for autofill purposes, such as a date represented in milliseconds since the epoch.

Parameters
dateMillisValue: Long

The long data to be used for autofill, representing a date in milliseconds since the epoch.

Returns
FillableData?

A FillableData object containing the long data, or null if the platform does not support autofill.

createFromListIndex

fun FillableData.Companion.createFromListIndex(listIndexValue: Int): FillableData?

Creates a FillableData instance from an Int.

This function is used to wrap an integer value for autofill purposes, such as the selected index in a dropdown menu or spinner.

Parameters
listIndexValue: Int

The integer data to be used for autofill, representing the index of the selected item in a list.

Returns
FillableData?

A FillableData object containing the integer data, or null if the platform does not support autofill.

createFromText

fun FillableData.Companion.createFromText(textValue: CharSequence): FillableData?

Creates a FillableData instance from a CharSequence.

This function is used to wrap a text value for autofill purposes.

Parameters
textValue: CharSequence

The text data to be used for autofill.

Returns
FillableData?

A FillableData object containing the text data, or null if the platform does not support autofill.