androidx.compose.ui.autofill
Interfaces
Autofill |
This interface is deprecated. You no longer have to call these apis when focus changes. |
Cmn
|
ContentDataType |
Content data type information. |
Cmn
android
|
ContentType |
Content type information. |
Cmn
android
|
FillableData |
Represents a single piece of data for autofill purposes. |
Cmn
|
Classes
AutofillManager |
Autofill API. |
Cmn
|
AutofillNode |
This class is deprecated. Use the new semantics-based Autofill APIs androidx.compose.ui.autofill.ContentType and androidx.compose.ui.autofill.ContentDataType instead. |
Cmn
|
AutofillTree |
This class is deprecated. Use the new semantics-based Autofill APIs androidx.compose.ui.autofill.ContentType and androidx.compose.ui.autofill.ContentDataType instead. |
Cmn
|
Objects
Enums
AutofillType |
This enum is deprecated. Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
Cmn
|
Modifiers
contentType |
Set autofill hint with |
Cmn
|
Top-level functions summary
ContentDataType |
ContentDataType(dataType: Int) |
android
|
ContentType |
ContentType(contentHint: String)Create a custom |
android
|
Extension functions summary
FillableData? |
FillableData.Companion.createFromAutofillValue(Creates a |
android
|
FillableData? |
FillableData.Companion.createFromBoolean(booleanValue: Boolean)Creates a |
Cmn
android
|
FillableData? |
FillableData.Companion.createFromDateMillis(dateMillisValue: Long)Creates a |
Cmn
android
|
FillableData? |
FillableData.Companion.createFromListIndex(listIndexValue: Int)Creates a |
Cmn
android
|
FillableData? |
FillableData.Companion.createFromText(textValue: CharSequence)Creates a |
Cmn
android
|
AutofillValue? |
Retrieves the underlying platform |
android
|
Extension properties summary
Int |
android
|
Top-level functions
ContentType
fun ContentType(contentHint: String): ContentType
Create a custom ContentType with contentHint.
This creates a ContentType with the parameter contentHint passed in. This API can be used if the Autofill hint is not present in the list of contentTypes provided by Compose.
For example, ContentType(androidx.autofill.HintConstants.AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE) can be used to create a new flight confirmation code hint.
Extension functions
FillableData.Companion.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 |
| Returns | |
|---|---|
FillableData? |
A |
FillableData.Companion.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.Companion.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.Companion.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.Companion.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. 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: CharSequence |
The text data to be used for autofill. |
| Returns | |
|---|---|
FillableData? |
A |
FillableData.toAutofillValue
fun FillableData.toAutofillValue(): AutofillValue?
Retrieves the underlying platform AutofillValue from the FillableData.
| Returns | |
|---|---|
AutofillValue? |
The platform |