View.DispatchProvideAutofillStructure(ViewStructure, AutofillFlags) Method

Definition

Dispatches creation of a ViewStructures for autofill purposes down the hierarchy, when an Assist structure is being created as part of an autofill request.

[Android.Runtime.Register("dispatchProvideAutofillStructure", "(Landroid/view/ViewStructure;I)V", "GetDispatchProvideAutofillStructure_Landroid_view_ViewStructure_IHandler", ApiSince=26)]
public virtual void DispatchProvideAutofillStructure (Android.Views.ViewStructure structure, Android.Views.AutofillFlags flags);
[<Android.Runtime.Register("dispatchProvideAutofillStructure", "(Landroid/view/ViewStructure;I)V", "GetDispatchProvideAutofillStructure_Landroid_view_ViewStructure_IHandler", ApiSince=26)>]
abstract member DispatchProvideAutofillStructure : Android.Views.ViewStructure * Android.Views.AutofillFlags -> unit
override this.DispatchProvideAutofillStructure : Android.Views.ViewStructure * Android.Views.AutofillFlags -> unit

Parameters

structure
ViewStructure

fill in with structured view data for autofill purposes.

flags
AutofillFlags

optional flags.

Attributes

Remarks

Dispatches creation of a ViewStructures for autofill purposes down the hierarchy, when an Assist structure is being created as part of an autofill request.

The default implementation does the following: <ul> <li>Sets the AutofillId in the structure. <li>Calls #onProvideAutofillStructure(ViewStructure, int). <li>Calls #onProvideAutofillVirtualStructure(ViewStructure, int). </ul>

Typically, this method should only be overridden by subclasses that provide a view hierarchy (such as ViewGroup) - other classes should override #onProvideAutofillStructure(ViewStructure, int) or #onProvideAutofillVirtualStructure(ViewStructure, int) instead.

When overridden, it must:

<ul> <li>Either call super.dispatchProvideAutofillStructure(structure, flags) or explicitly set the AutofillId in the structure (for example, by calling structure.setAutofillId(getAutofillId())). <li>Decide how to handle the #AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS flag - when set, all views in the structure should be considered important for autofill, regardless of what #isImportantForAutofill() returns. We encourage you to respect this flag to provide a better user experience - this flag is typically used when an user explicitly requested autofill. If the flag is not set, then only views marked as important for autofill should be included in the structure - skipping non-important views optimizes the overall autofill performance. </ul>

Java documentation for android.view.View.dispatchProvideAutofillStructure(android.view.ViewStructure, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to