Function

createFromText

Creates a FillableData instance from a CharSequence.

createFromText

Source set: Android
public 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. On Android, it creates an AutofillValue that contains the provided text. The text will be truncated to a safe length if it is too long to prevent android.os.TransactionTooLargeException.

Parameters

textValue The text data to be used for autofill.

Return

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

createFromText

Source set: Common
public 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. Depending on the platform, the text might be truncated to a safe length if it is too long to prevent crashing the IPC.

Parameters

textValue The text data to be used for autofill.

Return

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

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: