Function

createFromListIndex

Creates a FillableData instance from an Int.

createFromListIndex

Source set: Android
public 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. On Android, it creates an AutofillValue that represents a list selection.

Parameters

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

Return

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

createFromListIndex

Source set: Common
public 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 The integer data to be used for autofill, representing the index of the selected item in a list.

Return

A FillableData object containing the integer 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: