{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AutofillTree

@ExperimentalComposeUiApi
public final class AutofillTree


The autofill tree is a temporary data structure that is used before the Semantics Tree is implemented. This data structure is used by compose components to set autofill hints (via AutofillNodes). It is also used by the autofill framework to communicate with Compose components (by calling performAutofill).

The AutofillTree will be replaced by Autofill Semantics (b/138604305).

Since this is a temporary implementation, it is implemented as a list of children, which is essentially a tree of height = 1

Summary

Public constructors

Public methods

final @NonNull Map<@NonNull Integer, @NonNull AutofillNode>

A map which contains AutofillNodes, where every node represents an autofillable field.

final Unit
performAutofill(int id, @NonNull String value)

The autofill framework uses this function to 'fill' the AutofillNode represented by id with the specified value.

final void

Add the specified AutofillNode to the AutofillTree.

Public constructors

AutofillTree

public AutofillTree()

Public methods

getChildren

public final @NonNull Map<@NonNull Integer, @NonNull AutofillNodegetChildren()

A map which contains AutofillNodes, where every node represents an autofillable field.

performAutofill

public final Unit performAutofill(int id, @NonNull String value)

The autofill framework uses this function to 'fill' the AutofillNode represented by id with the specified value.

plusAssign

public final void plusAssign(@NonNull AutofillNode autofillNode)

Add the specified AutofillNode to the AutofillTree.